Solving Integral in matlab

2 vues (au cours des 30 derniers jours)
SHAMA NOREEN
SHAMA NOREEN le 17 Avr 2023
Modifié(e) : Torsten le 17 Avr 2023
I need to solve this integral in matlab
Where a=1, b=0.71, c=0.53.
I have tried this in matlab
syms s
a=1;
b=0.71;
c=0.53;
f = 1/((s+a^2)*sqrt(((s+a)^2)*((s+b)^2)*((s+c)^2)));
F = int(f, 0, inf)
but I am unable to solve the problem

Réponses (2)

Dyuman Joshi
Dyuman Joshi le 17 Avr 2023
Modifié(e) : Dyuman Joshi le 17 Avr 2023
There are cases when int is unable to compute the value of definite integral. In such cases, use vpa to obtain the approximate numerical value
syms s
a = 1;
b = 0.71;
c = 0.53;
f = 1/((s+a^2)*sqrt(((s+a)^2)*((s+b)^2)*((s+c)^2)));
F = int(f, 0, inf);
val1 = vpa(F)
val1 = 
0.67917589608295134074024322188586
You can use vpaintegral directly as well -
val2 = vpaintegral(f,0,inf)
val2 = 
0.679176
  1 commentaire
SHAMA NOREEN
SHAMA NOREEN le 17 Avr 2023
Thank you

Connectez-vous pour commenter.


Torsten
Torsten le 17 Avr 2023
Modifié(e) : Torsten le 17 Avr 2023
syms s
a=sym('1');
b=sym('71/100');
c=sym('53/100');
f = 1/((s+a^2)*(s+a)*(s+b)*(s+c));
F = a*b*c/2*int(f)
F = 
limit(F-subs(F,s,0),s,Inf)
ans = 

Community Treasure Hunt

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

Start Hunting!

Translated by