MATLAB Answers

How do I calculate this definite integral in matlab

21 views (last 30 days)
Behzad Rahmani
Behzad Rahmani on 28 Feb 2021
Commented: darova on 1 Mar 2021
hello. I want to calculate this integral. But it does not answer.
please check it. thanks
clc
clear
syms x
f = (124-x)^3/((12.152-2*x)^2*(1.24-x));
F = int(f, x, 0, 4.23)

Answers (2)

darova
darova on 28 Feb 2021
Try trapz
  2 Comments

Sign in to comment.


Steven Lord
Steven Lord on 28 Feb 2021
When I encounter a problem integrating, one of my first thoughts is to look at the function I'm trying to integrate over the interval of integration.
syms x
f = (124-x)^3/((12.152-2*x)^2*(1.24-x));
fplot(f, [0, 4.23])
That section around x = 1.24 could prove problematic.
  1 Comment
Behzad Rahmani
Behzad Rahmani on 1 Mar 2021
I calculated this integral with a site and it gave me the number -72828.4694525021.
Now I want to calculate with MATLAB and compare the answers.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!