I'm trying to figure out how to solve differential equations of the type y' = a(t)y(t) + b(t)

(such as the simple one y'(t) = t-y(t))

I find the book quite vague on this.

Is there anyone that can give me a proper explanation of this?

Reinout

reinout-g
Jun 5, 2014

#2**0 **

Sure,

they are called non-autonomous linear first order differential equations.

reinout-g
Jun 5, 2014

#3**+14 **

okay , the name sounds a bit scary but ill try to find out ! all the best for ur search !

rosala
Jun 5, 2014

#4**+10 **

Here's how it's done for your simple example. It isn't always possible to get nice results for situations where a(t) and b(t) are very complicated. For those, use a numerical method!

I need to correct one item above. In general the integrating factor is $$e^{\int{-a(t)}dt}$$ not $$e^{-a(t)t}$$.

Just noticed Bertie has said this below.

Alan
Jun 5, 2014

#5**+14 **

see my " all the best " works ! alan came so fast for ur helt after my " all the best " isnt it !

rosala
Jun 5, 2014

#6**+10 **

The usual approach is to use what is known as an Integrating Factor.

For your example, start by moving a(t)y(t) to the lhs and then multiply throughout by

$$\displaystyle \exp\{\int-a(t)dt\}$$

The lhs will then be a perfect derivative,

$$\displaystyle \frac{d}{dt}\left[\exp\{\int-a(t)dt\}.y(t)\right]$$

and, (hopefully), you can then integrate both sides, having already (hopefully), integrated a(t).

Bertie
Jun 5, 2014

#7**+3 **

Thank you Alan

So I gave it a try (not really involving a(t) yet)

and this is what I have

$$\begin{array}{rll} \frac{dy}{dt} = y-t^2\\

\frac{dy}{dt} - y = -t^2\\

e^{-t}\frac{dy}{dt}-e^{-t}y = -e^{-t}t^2\\

\frac{d}{dt}(e^{-t}y) = -e^{-t}t^2\\

\end{array}$$

$$\begin{array}{rll} e^{-t}y = e^{-t}(t^2+2t+2)+c\\

\mbox{Since }y(0)=y_0\\

e^0y_0 = e^0(0^2-2*0+2)+c\\

c = y_0-2\\

y(t) = t^2+2t+2+y_0-2\\

y(t) = t^2+2t+y_0

\end{array}$$

Does that make sense?

edit: (I also did it for a(t) = t, but I just found my mistake)

reinout-g
Jun 5, 2014

#10**+10 **

e^{-t}y = e^{-t}(t^{2} + 2t + 2) + c, where c = y_{0} - 2.

Multiply throughout by e^{t}.

Bertie
Jun 5, 2014

#11**+10 **

Bertie is right.

Also, in the line below "Since y(0) = y_{0}" you have the term -2*0. This should be +2*0. However, since the result is zero anyway, this doesn't have any impact on the result!

Alan
Jun 5, 2014

#13**+14 **

reinout u didnt say anything about my " all the best " ? i think u forgot it !

rosala
Jun 6, 2014