>> c
c =
(x*cos(x)*sin(x))/(a^2*cos(x)^2 + b^2*sin(x)^2)^2
>> pretty(c)
x cos(x) sin(x)
--------------------------
2 2 2 2 2
(a cos(x) + b sin(x) )
>> int(c,0,(pi/2))
ans =
int((x*cos(x)*sin(x))/(a^2*cos(x)^2 + b^2*sin(x)^2)^2, x, 0, pi/2)
>> pretty(ans)
pi
--
2
/
| x cos(x) sin(x)
| -------------------------- dx
/ 2 2 2 2 2
0 (a cos(x) + b sin(x) )

 Réponse acceptée

Ameer Hamza
Ameer Hamza le 21 Avr 2020

0 votes

This shows that MATLAB is not able to find a closed-form expression for the integration problem. You can still find the numerical answer by substituting the numeric values of a and b
syms x a b
c = (x*cos(x)*sin(x))/(a^2*cos(x)^2 + b^2*sin(x)^2)^2;
c_int = int(c, x, 0, pi/1);
x = subs(c_int, [a b], [1 2]);
This will give the value of integration at a=1, b=2. Result:
>> x
x =
-pi/12

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by