How do I evaluate the area between two curves?

1 view (last 30 days)
I'm given:
y= and y=. It's interval x [0; inf)
How do I calculate the area of this figure?
  2 Comments
dpb
dpb on 23 Mar 2019
So, what have you done and where did you get stuck?
What toolboxes are you allowed to use?
nexwa
nexwa on 23 Mar 2019
I'm not sure what to do at the first place but I assume I have to write something like this? Also what do you mean with toolboxes? We are using simply script editor in matlab
syms x
fplot((3x^2-12.3x+6),[?]),axis equal, axis([?]), hold on
fplot((-x^3+3.22x^2-2x+2.94,[?]),plot([?],[?]),grid on
solve((3x^2-12.3x+6)==(-x^3+3.22x^2-2x+2.94),x)
S=int((3x^2-12.3x+6)-(-x^3+3.22x^2-2x+2.94),x,?,?) // I'm not sure what I should write instead of question marks in my problem.

Sign in to comment.

Accepted Answer

nexwa
nexwa on 24 Mar 2019
I've solved it, apparantly it was really easy haha, anyways, in case anyone would like to know here's the code:
clear all
clc
syms x
y1=3*x^2-12.3*x+6;
y2=-x^3+3.22*x^2-2*x+2.94;
vpa(solve(y1==y2),6)
fplot(3*x^2-12.3*x+6, [0 4]), hold on
fplot(-x^3+3.22*x^2-2*x+2.94, [0 4])
S=vpa(int((y2-y1),x,0.297757,3.16711),6)
  1 Comment
madhan ravi
madhan ravi on 24 Mar 2019
Edited: madhan ravi on 24 Mar 2019
+1, you may also be interested in representing the array graphically as well.

Sign in to comment.

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!