Can I get the integral formula using Matlab?

1 view (last 30 days)
Haya M
Haya M on 24 Apr 2021
I have the following integration:
$\int_{0}^{2\pi}\frac{1}{\pi}\sin(nx/2)(\pi-x)^2\sin(mx/2)dx$
and m and n are integers.
Can I get the formula for this integration using Matlab?
Here is my attempt:
clear all
syms x m n
f = (1/pi)*sin(n*x/2)*(pi-x)^2*sin(m*x/2);
Fint = int(f,x,[0 2*pi]);
I got this long result which is ok for me in case it is correct:
(5734161139222659*(8*m^3*cos(pi*m)*sin(pi*n) - 8*n^3*cos(pi*n)*sin(pi*m) - 8*pi*m*n^3 + 8*pi*m^3*n + 4*m^4*pi*sin(pi*m)*sin(pi*n) - 4*n^4*pi*sin(pi*m)*sin(pi*n) + 24*m*n^2*cos(pi*m)*sin(pi*n) - 24*m^2*n*cos(pi*n)*sin(pi*m) - m^5*pi^2*cos(pi*m)*sin(pi*n) + n^5*pi^2*cos(pi*n)*sin(pi*m) - m*n^4*pi^2*cos(pi*m)*sin(pi*n) + m^4*n*pi^2*cos(pi*n)*sin(pi*m) - 2*m^2*n^3*pi^2*cos(pi*n)*sin(pi*m) + 2*m^3*n^2*pi^2*cos(pi*m)*sin(pi*n) - 8*m*n^3*pi*cos(pi*m)*cos(pi*n) + 8*m^3*n*pi*cos(pi*m)*cos(pi*n)))/(9007199254740992*(m^2 - n^2)^3)
when I assume then the result is undefied..
I appreciate any help..

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!