asked 2017-03-19 10:07:00 -0500
This post is a wiki. Anyone with karma >750 is welcome to improve it.
I got a problem with substituting a solution into another equation. I could break down my problem to a simple example:
r = var('r'); p = function('p')(r); v = var('v'); v = p + p.derivative(r); p1(r)=desolve(p.derivative(r)==0,p,ivar=r); p1(r) v.subs(p(r)==p1)
_C _C + diff(p(r), r)
What's happening here? Why is p substituted, but not diff(p,r)=0? What's the correct way to do this substitution?