- How to create symbolic function
- diff and numden to approximate derivates and extract numerator and denominator respectively
- dsolve to solve differential equations
I'm a beginner in matlab, and I'm not that bright at calculus, can someone answer and explain to me this problem.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
This is the problem:
In this problem you will use MATLAB to find the critical values of a function. Recall that the critical values of a function
are values of x for which
or
is undefined, In cases where the derivative function \\\\ can be expressed as a fraction
, the critical values of x where either
or
equal 0 and consequently the derivative equals 0 or does not exist.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820355/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820360/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820365/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820370/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820375/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820380/image.png)
Follow the steps to obtain the expressions for the critical value of the function f(x)= x^3/5((4-x)^1/3) :
1. Define the symbolic function
corresponding to the formula above.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820385/image.png)
2. Use the diff function to differentiate
and definte the symbolic function ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820395/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820390/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820395/image.png)
3. Use the numden function to obtain symbolic expressions for the numerator and denominator of
, and store them in the variables \\\ and \\\ respectively.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820400/image.png)
4. Use the solve function along with the n and d to obtain the solutions to the equations
and
. Assign them to the variables nzeros and dzeros respectively.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820405/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/820410/image.png)
This is the code given:
syms x
f(x) = (x^3/5)*((4-x)^1/3)
df(x) = 18/7
[n d] = 0
nzeros = 0
dzeros = 0
%%%%%%% Plotting code below %%%%%%%%
figure; hold on; grid on;
fplot(f(x),'LineWidth',2);
fplot(df(x),'LineWidth',2);
ylim([-6,6]);
legend('$f(x)$','$f''(x)$','Interpreter','latex','FontSize',14);
0 comentarios
Respuestas (2)
Anshika Chourasia
el 31 de Dic. de 2021
Hi,
Please refer the examples discussed in the below links to get more insights on solving a differential equation:
0 comentarios
Walter Roberson
el 31 de Dic. de 2021
The equation I use here is deliberately different than what you are using, because you are doing homework.
syms x
f(x) = ((x+1)^(2/7))*((2-x)^(2/11))
df(x) = diff(f,x)
[n d] = numden(df)
solve(n)
solve(d)
%%%%%%% Plotting code below %%%%%%%%
figure; hold on; grid on;
fplot(f(x), [-3 3], 'LineWidth',2);
fplot(df(x), [-3 3], 'LineWidth',2);
ylim([-6,6]);
legend('$f(x)$','$f''(x)$','Interpreter','latex','FontSize',14);
0 comentarios
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!