matlab 求定积分,积分的上限是变量,函数带有其他参数

问题描述:

matlab 求定积分,积分的上限是变量,函数带有其他参数
积分表达式为:y=1/(t+2(r-sqrt(r^2-(m/2-x)^2))),积分区间为(0,m),其中0

>> syms t r m x
>> y=1/(t+2*(r-sqrt(r^2-(m/2-x)^2)));
>> f=int(y,0,m);
f=simple(f);
f
1/2*(-i*t*atanh((4*r^2+(-t*(t+4*r))^(1/2)*m)/((t+2*r)^2)^(1/2)/(-m^2+4*r^2)^(1/2))+2*t*atan(m/(t^2+4*t*r)^(1/2))-i*t*atanh((-4*r^2+(-t*(t+4*r))^(1/2)*m)/((t+2*r)^2)^(1/2)/(-m^2+4*r^2)^(1/2))-2*i*atanh((-4*r^2+(-t*(t+4*r))^(1/2)*m)/((t+2*r)^2)^(1/2)/(-m^2+4*r^2)^(1/2))*r-2*atan(1/(-m^2+4*r^2)^(1/2)*m)*(t*(t+4*r))^(1/2)+4*atan(m/(t^2+4*t*r)^(1/2))*r-2*i*atanh((4*r^2+(-t*(t+4*r))^(1/2)*m)/((t+2*r)^2)^(1/2)/(-m^2+4*r^2)^(1/2))*r)/(t*(t+4*r))^(1/2)