Can this be integrated within MATLAB?

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

 Accepted Answer

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 Comments

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)
Thanks. I got it!

Sign in to comment.

More Answers (1)

Torsten
Torsten on 4 Apr 2022
Edited: Torsten on 4 Apr 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

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!