Clear Filters
Clear Filters

How to calculate detivative of a function with respect to another function

1 view (last 30 days)
Hi! I want to calculate the derivative below in matlab
Have anyone any idea?

Accepted Answer

madhan ravi
madhan ravi on 31 May 2020
Edited: madhan ravi on 31 May 2020
syms u x
subs(diff(u^2 - 1), u, cos(x))

More Answers (1)

Alan Stevens
Alan Stevens on 31 May 2020
Surely you don't need to do this in Matlab!
Just set u = cos(x), so you have d/du(u^2 - 1) = 2u = 2cos(x)

Categories

Find more on Symbolic Math Toolbox 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!