How to define each of the following functions and have Matlab compute the indicated derivative, and the value of the derivative for the specified inputs.
2 views (last 30 days)
Show older comments
Weiyan Chen
on 17 Oct 2016
Answered: Walter Roberson
on 18 Oct 2016
1) f(x)=x^7-3x^5+5x^4+3; f'''(x); x=1:5
2) g(x)=e^(xsinx)+2ln(x^2+1); g''(x); x=-pi:pi/4:pi
3) h(x,y)=(x^2+y^2)/((x+y)^2); h(xy)(x,y);e valuate at all pairs(1,1),(2,2),(3,3),(4,4),(5,5)
4) t(x,y,z)=(x^3)(y^2)(z)+((x^2)+(y^2)+(z^2))^(1/2); t(xyz)(x,y,z); evaluate at the eight vertices of the cube with coordinates atx=+-1, y=+-1, z=+-1
Accepted Answer
Walter Roberson
on 18 Oct 2016
Example:
syms p(x,y,z)
p(x,y,z) = x^3 * sin(y) * exp(z);
dpxyz = diff(p,x,y,z);
r = subs(dpxyz(x,y,z), {x, y, z}, {linspace(-5,5,10), 1:3:30, logspace(-3,-1,10)})
0 Comments
More Answers (0)
See Also
Categories
Find more on Special Values 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!