Solving equation, calculus derivatives
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I really am stuck on this question, any help appreciated,
For the function f(x) = (exp(-2*x)-2.7*x^2)/(cosh(3*x)
find the coordinates of the point with x>0 at which f has a zero derivative.
x =?
y=?
I know that I have to differentiate the function, and than set the derivative to zero, however I canot seem to set f'(x)=0 on matlab, this is what I have done so far.
syms x
f=inline((exp(-2*x)-2.7*x^2)/(cosh(3*x)))
df=diff(f(X),x)
and than i try and do fzero(df,1) on matlab, to set the derivative to zero, and than find he value of x, which I will than put back into the derivative to get the value of y. However i am really stuck from this point onwards.
Any help appreciated.
0 commentaires
Réponses (1)
Walter Roberson
le 17 Fév 2013
There is no reason to inline()
syms x
f = (exp(-2*x)-2.7*x^2)/(cosh(3*x));
df = diff(f, x);
solve(df, x)
1 commentaire
Pascal André
le 2 Oct 2015
Modifié(e) : Pascal André
le 2 Oct 2015
Pay attention to syms and double:
Example:
syms t
x=100*t
dx=diff(x,t)
y=100*t-9.81*t^2
dy=diff(y,t)
timpact=max(double((solve(y,t))))
xmax=subs(x,t,timpact)
thmax=double(solve(dy,t))
ymax=subs(y,t,thmax)
I hope to have contributed a little cause I am a beginner.
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!