matlab - 具有可变限制的积分

标签 matlab variables integration nonlinear-functions

嗨,我正在努力使用 matlab 求解以变量为极限的积分,我遇到的两个最大问题是 matlab 无法明确地找到积分,而且很多数值方法都不会,除了变量

我要解决

0=H/2R  - integral (z(x) between b and 1)

z(x)= (((x/((a*x*x)+1-a))^2)-1)^-0.5
b= (sin(t)+sqrt(t^2 + 4a(a-1)))/2a

我知道 H、R 和 t,我的想法是求解积分然后求解 a 的非线性方程,我知道对非线性方程使用 fzero/fsolve 但我正在努力求解积分

最佳答案

enter image description here

您可以尝试一种射击方法 - 猜测 a 的值并从那里进行数值求解,直到找到可以求解最后一个方程式的 a 值。这是一些应该起作用的东西(尽管我随机猜测了数值并且没有让它收敛)

function test

    a_guess = .1
    fzero(@(a) solveWithA(a), a_guess)


    function res = solveWithA(a)

    t = .9;

    H = 1.5;
    R = 1.1;


    z = @(x) (((x/((a*x*x)+1-a))^2)-1)^-0.5;
    b = (sin(t)+sqrt(t^2 + 4*a*(a-1)))/(2*a);

    lower_limit = b;

    integrand = z;


    [T, Y] = ode45(@(t, x) integrand(x),[lower_limit 1],0);

    res = norm((H/2/R - Y(end)))

    end

end

但是对于...的解析表达式我认为它是笔和纸 :) 尝试手工计算不定积分,然后应用极限?但是,从被积函数中删除 a 仍然会留下令人讨厌的结果。可能有一个“技巧”可以更好地解决数学溢出问题。

enter image description here

关于matlab - 具有可变限制的积分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13788154/

相关文章:

matlab - 在 Octave/Matlab 中向量化 ODE

c++ - 在 Matlab 中加载 .dll 导致 'type not found' 问题

performance - MATLAB:匿名函数的性能问题

matlab - 在低分辨率灰度图像中查找重叠圆的中心

c# - 在 C# 中运行代码行后,变量的值会发生变化吗?

php - "Notice: Undefined variable"、 "Notice: Undefined index"、 "Warning: Undefined array key"和 "Notice: Undefined offset"使用 PHP

java - 尝试使用 Alakai 插件将 Launch4j 集成到 Maven 项目中

integration - 将 POS 应用程序与 VeriFone 终端集成

c# - 如何从c#代码中调用java中的方法?

variables - 如何在 prestashop 1.5 中创建 smarty 变量