Find the area of the regions enclosed by the curves y=x^2-2x, y=x.

30 visualizzazioni (ultimi 30 giorni)
clc
clear
syms x
y1 = x^2-2*x;
y2 = x;
fplot(y1)
hold all
fplot(y2)
xi = solve(y1-y2);
yi(1) = eval(subs(y1,xi(1)));
yi(2) = eval(subs(y1,xi(2)));
plot(xi,yi,'o')
%% integration... how to use that over here???

Risposte (1)

John D'Errico
John D'Errico il 19 Dic 2020
You know the x locations of the two points where the curves intersect.
Is the area not just the integral of y2-y1 between those limits?
Just use int for that?

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by