How to do symbolic integration
3 次查看(过去 30 天)
显示 更早的评论
%% I am unable to get the result. Thank you so much in advance
clc;
clear;
syms omega x n m
% assuming omega::real,omega>0,m::integer,m>0,n::integer,n>0;
fun=int(cos(atan(1,x))^m*sin(omega*x)/(1+x^2)^((n)/2+1),x,0,Inf);
0 个评论
回答(2 个)
Star Strider
2021-12-23
It apparently does not have a symbolic solution (this is not uncommon).
It does have a piecewise closed-form solution, at least over some regions, and one option would be to numerically integrate it (although that could have problems as well) —
syms omega x n m real
sympref('AbbreviateOutput',false);
assume(m,'integer')
assumeAlso(m,'positive')
assume(n,'integer')
assumeAlso(n,'positive')
assume(omega,'positive')
% assuming omega::real,omega>0,m::integer,m>0,n::integer,n>0;
integrand = cos(atan(1,x))^m*sin(omega*x)/(1+x^2)^((n)/2+1)
integrand = simplify(integrand, 500)
fun=int(integrand,x,0,Inf)
nfun = matlabFunction(integrand) % Anonymous Function Argument To 'integral'
This likely as good as it gets.
.
KSSV
2021-12-23
Try substituing the values of m and n.
syms omega positive real
% syms n m positive integer
syms x
% assuming omega::real,omega>0,m::integer,m>0,n::integer,n>0;
m = 5 ; n = 4 ;
fun=int(cos(atan(1,x))^m*sin(omega*x)/(1+x^2)^((n)/2+1),x,0,Inf)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!