I have tried
syms X Beta base f
f = ((X./(1+Beta*(X./(base+1e-9))).^2)*base);
Fint = ((int(f,base,[0 1])));
Effective = (3*(1+base)^2)*Fint;
but this has resulted in the answer not being numerical but just displaying the integration

 Réponse acceptée

Joel Archbold
Joel Archbold le 4 Avr 2022

0 votes

That still didn't work. I have attached my MATLAB file below. The integration is on line 173 of HW_2_1. I'm doing an assignment and the question asks for this integration. I assume that he doesn't want us to integrate it by hand and rather use MATLAB to do this

3 commentaires

Joel Archbold
Joel Archbold le 4 Avr 2022
It's for a numerical solution rather than exact
What are the variables involved ?
XC0, zeta, beta ? Arrays or scalars ?
If it's all numerical, I suggest
expr = XC0.*base.*(base+1e-9).^2./(base+1e-9+beta.*XC0).^2;
Integral = trapz(base,expr)
Joel Archbold
Joel Archbold le 4 Avr 2022
Thanks. I got it!

Connectez-vous pour commenter.

Plus de réponses (1)

Torsten
Torsten le 4 Avr 2022
Modifié(e) : Torsten le 4 Avr 2022
syms XC0 beta zeta
f = XC0*zeta*(zeta+sym('1e-9'))^2/(zeta+sym('1e-9')+beta*XC0)^2
intf = int(f,zeta,0,1)
Output:
2 2
XC0 *beta*(1500000000*XC0*beta + 1)*log(1000000000*XC0*beta + 1) XC0 *beta*(1500000000*
- ---------------------------------------------------------------- + ----------------------
500000000
4
XC0*beta + 1)*log(1000000000*XC0*beta + 1000000001) 2 XC0 1000000000*XC0 *b
--------------------------------------------------- - 2*XC0 *beta + --- + -----------------
500000000 2 1000000000*XC0*b
3 3 2 4 3 3 2
eta + XC0 *beta 1000000000*XC0 *beta + XC0 *beta
----------------- - ----------------------------------
eta + 1000000001 1000000000*XC0*beta + 1

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by