Solving equation, calculus derivatives
10 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 17 Feb 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 Comment
Pascal André
on 2 Oct 2015
Edited: Pascal André
on 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.
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!