Symbolically differentiation a function w.r.t a function
Mostra commenti meno recenti
How to differentiate
with respect to
; where,
with the help of symbolic math tool. I tried writing
with respect to
; where,
with the help of symbolic math tool. I tried writing syms f(x) g(x) h(x) x
g(x) = sqrt(f(x)^2 + x);
h(x) = diff(g(x),f(x));
but the following error pops up,
%Error using sym/diff (line 70)
%Second argument must be a variable or a nonnegative integer specifying the number of differentiations.
I am new to MATLAB and trying to understand the reason for this error and any suggestions on how can I write;
Risposta accettata
Più risposte (1)
Walter Roberson
il 19 Gen 2020
1 voto
You cannot differentiate a function with respect to a different unknown function with normal calculus, because you cannot know that the functions are independent. You need Calculus of Variations to create operators for differentiating functions.
In the past I have posted examples demonstrating that the process suggested by Darova can generate the wrong answer.
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!