- https://www.mathworks.com/help/matlab/ref/fplot.html
- https://www.mathworks.com/help/symbolic/sym.solve.html
- https://www.mathworks.com/help/matlab/ref/integral.html
- https://www.mathworks.com/matlabcentral/answers/15550-how-to-create-a-matlab-program-computing-area-between-2-curves
- https://www.mathworks.com/matlabcentral/answers/427905-how-can-i-calculate-the-area-between-two-curves?s_tid=answers_rc1-1_p1_Topic
how to resolve this problem?
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Considera la función f(x) = x/raiz(x^2+1) . Estudia sus puntos críticos, crecimiento y decrecimiento, puntos de corte con los ejes y asíntotas. Representa la función f(x).
Determina el área comprendida entre f(x) y la recta y = x/2 .
0 commentaires
Réponse acceptée
Praveen Reddy
le 8 Mai 2023
Modifié(e) : Praveen Reddy
le 8 Mai 2023
Hi Ahmed,
I understand that you want to plot the curves f(x)= x/sqrt((x^2)+1), y=x/2 and determine the area between the curves.
To plot the curves you can use “fplot” function. Please refer the following code snippet.
fplot(@(x) x/sqrt((x^2)+1),[-4 4],'r')
hold on
fplot(@(x) x/2,[-4 4],'b')
To find the area between the curves:
Find the x coordinates of intersection points. Please refer to the following code snippet.
syms x
eqn = x/sqrt((x^2)+1)==x/2;
X=solve(eqn,x)
The x coordinates of intersection points are -1.7321, 0, 1.7321. Integrate y= x/sqrt((x^2)+1)- x/2 over [0,1.7321] and y= x/2- x/sqrt((x^2)+1) over [-1.7321,0] . As the graph is symmetric about origin, it is sufficient if you obtain one half of area and multiply it by 2. Please refer to the following code snippet
fun= @(x) ((x/sqrt((x.^(2))+1))-(x/2));
area1=integral(fun,0,1.732);
area=2*area1
Please refer to the following MATLAB documentations and MATLAB answers for better understanding and other methods to calculate area between two curves:
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!