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
Sure,
they are called non-autonomous linear first order differential equations.
okay , the name sounds a bit scary but ill try to find out ! all the best for ur search !
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.
see my " all the best " works ! alan came so fast for ur helt after my " all the best " isnt it !
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).
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)
Bertie is right.
Also, in the line below "Since y(0) = y0" 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!
reinout u didnt say anything about my " all the best " ? i think u forgot it !