Time derivative and exponential

salves

New member
Joined
Sep 26, 2014
Messages
6
So in an example (Hamiltonian in an economic context), I don't get this step:

--> pi'(t)=-r*pi(t)
becomes
--> pi(t)= exp(-rt)*pi(0)

Thank you for your help.
 
So in an example (Hamiltonian in an economic context), I don't get this step:

--> pi'(t)=-r*pi(t)
becomes
--> pi(t)= exp(-rt)*pi(0)

Thank you for your help.

ok so answering my own thread:

pi'(t)/pi(t)=-r -> integrate
ln(pi(t))=-r*t + C -> exponential
pi(t)= exp(-r*t+C)
pi(t)=exp (-r*t) * exp(C) -> setting C= pi(0)
pi(t)=exp(-rt)*pi(0)

So never mind. Just posting here helped!
 
Still the in the same example, I have:

s'(t)=r*s(t)-1/pi(0)*exp(r*t)

Solving this equation, we get:

s(t)= (C-t/pi(0))*exp(r*t)

This one, I can't figure out.
 
I'm not clear what you mean by "pi(0)". Is "pi" some function of x so that pi(0) is an unknown constant?
 
pi(0) is the value of pi(t) at time 0. It is a constant.

EDIT: and yes pi(t) is a function of t. ( t being the main variable)
 
Last edited:
Still the in the same example, I have:

s'(t)=r*s(t)-1/pi(0)*exp(r*t)

Solving this equation, we get:

s(t)= (C-t/pi(0))*exp(r*t)

This one, I can't figure out.

This is first order ODE of the form

y' + y * h(x) = g(x)

You need to use an integrating factor of the form \(\displaystyle e^{\int h(x) dx}\)
 
Still the in the same example, I have:

s'(t)=r*s(t)-1/pi(0)*exp(r*t)

Solving this equation, we get:

s(t)= (C-t/pi(0))*exp(r*t)

This one, I can't figure out.
So we can write this as s'= rs- (1/pi(0))e^(rt)

That is a "linear, non-homogeneous, differential equation with constant coefficients". Since it is linear, we can separate out the "associated homogeneous equation", s'= rs, find the general solution to it, then add on any single solution to the entire equation.

s'= rs is easy to solve: write it as ds/dt= rs, then as ds/s= r dt and integerate: ln(s)= rt+ C so s= ce^(rt) where c= e^C.

Now, normally, since derivatives of e^(rt) are of the form e^(rt), in order to get that "e^(rt)" on the right side of the original equation we would try something of the form s= Ae^(rt). But, here, e^(rt) is already a solution to the homogeneous equation. Putting Ae^(rt) into the equation would just give us 0 no matter what A was. So, instead, try s= Ate^(rt). (Knowing that is mostly a matter of experience- just see what happens when we differentiate.) Then, using the product rule, s'= Ae^(rt)+ Arte^(rt)= Ae^(rt)(1+ rt). The equation becomes Ae^(rt)(1+ rt)= rAte^(rt)- (1/pi(0))e^(rt). e^(rt) is never 0 so we can divide by it: A(1+ rt)= A+ Art= rAt- 1/pi(0) so A= -1/pi(0). -(1/pi(0))te^(rt) is a solution to the entire equation.

So the general solution to the entire equation is s(t)= ce^(rt)- (1/pi(0))te^(rt)= e^(rt)(c- t/pi(0)).

A slightly different way to do it- called "variation of parameters": Knowing that ce^(rt), for any constant, c, is a solution to the associated homogeneous equation, we seek a solution to the entire equation of the form s= u(t)e^(rt). (That "c" in the original function is the "parameter" we are "varying" or replacing with a function of t.)

Now, using the product rule, s'= u'e^(rt)+ rue^(rt). The equation becomes u'e^(rt)+ rue^(rt)= rue^(rt)- (1/p(0))e^(rt). Precisely because ce^(rt) satisfied the associated homogeneous equation, the "rue^(rt)" terms cancel, leaving u'e^(rt)= -(1/p(0))e^(rt). Again, we can divide by e^(rt) and are left with u'= -(1/p(0)) so that u(t)= -(1/p(0))t+ C. That means that our solution to the equation is s= u(t)e^(rt)= [-(1/p(0))t+ C]e^(rt)= Ce^(rt)- (1/p(0))te^(rt) again.
 
Top