Implicite Differentiation with MATLAB
2 views (last 30 days)
Show older comments
Hello,
I have the following differential equation: dy/dx = 1 / (2*x^2*y - 1)
I need the n-th derivation of this equation at the point x = 0. Is there a possibility to calculate the implicit derivation with MATLAB? (I need the first 500-1000 derivations)
1 Comment
Walter Roberson
on 30 May 2011
How does this differ from the (still open) question http://www.mathworks.com/matlabcentral/answers/8200-riccati-differential-equation ?
Answers (1)
John D'Errico
on 30 May 2011
You need up to 1000 derivatives? I must still my fingers while I laugh out loud. Oops, sorry, now I am rolling on the floor. Ok, I have stilled the fits of laughter. With what precision do you think you will do these computations?
Well. if all you need is the first derivative at x == 0, then it is clearly -1.
To compute the second derivative, differentiate the right hand side. You can do that by hand, or with the symbolic toolbox (lazy, lazy, lazy.) Repeat the symbolic differentiation and application of the chain rule until you have the desired order derivative, or until you realize/accept the foolishness of your task.
At any point where you need to know the value of dy/dx, simply substitute the known expression for dy/dx (dx/dx is trivial.) In the end, substitute x = 0, and if available, y at x = 0 too.
It is just an exercise in calculus, not really in MATLAB at all.
1 Comment
Walter Roberson
on 30 May 2011
I believe that it would be a fair question to ask whether one could construct the n'th derivative knowing the value of n but without having to first calculate the 1, 2, 3, .... n-1 derivatives.
The testing I did on this in response to the earlier Question (and just now) did not show any immediately obvious "nice" pattern. The complexity would, though, depend in part on what y(x) was: any polynomial y(x) would, after enough differentiations, start contributing 0 terms, and that might perhaps lead to a useable recursion formula that was less complex than full differentiation.
See Also
Categories
Find more on Linear Algebra 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!