# ode question from a textbook - probably an easy answer

• April 9th 2013, 08:18 PM
selecttext
ode question from a textbook - probably an easy answer
Hi,

I do not understand the following derivation. Could somebody please enlighten me:

dx/dt = b - ax

to solve, define a new variable y(t) = x(t) - b/a

since dy/dt = dx/dt, we can derive the equation dy/dt = - ay [*]

since y(t) = y(0)exp(-at) and substituting back to express the solution in terms of x(t)

x(t) = b/a + (x(0) - b/a) exp(-at) [*]

>>>I don't know how they got [*] and then [**].
• April 9th 2013, 11:47 PM
agentmulder
Re: ode question from a textbook - probably an easy answer
Quote:

Originally Posted by selecttext
Hi,

I do not understand the following derivation. Could somebody please enlighten me:

dx/dt = b - ax

to solve, define a new variable y(t) = x(t) - b/a

since dy/dt = dx/dt, we can derive the equation dy/dt = - ay [*]

since y(t) = y(0)exp(-at) and substituting back to express the solution in terms of x(t)

x(t) = b/a + (x(0) - b/a) exp(-at) [*]

>>>I don't know how they got [*] and then [**].

Using

dx/dt = b - ax

replace dx/dt with dy/dt and replace x with (y + b/a)

dy/dt = b - a(x + b/a) = -ay

using

y(t) = x(t) - b/a

solve for x(t) and substitute for y(t) from THEIR previous line.

I think the (t) symbol may be confusing...

:)
• April 10th 2013, 04:40 AM
selecttext
Re: ode question from a textbook - probably an easy answer
sweet thanks! i am revisiting an old textbook and i once knew this solution. what a revelation
• April 10th 2013, 04:44 PM
Prove It
Re: ode question from a textbook - probably an easy answer
Quote:

Originally Posted by selecttext
Hi,

I do not understand the following derivation. Could somebody please enlighten me:

dx/dt = b - ax

to solve, define a new variable y(t) = x(t) - b/a

since dy/dt = dx/dt, we can derive the equation dy/dt = - ay [*]

since y(t) = y(0)exp(-at) and substituting back to express the solution in terms of x(t)

x(t) = b/a + (x(0) - b/a) exp(-at) [*]

>>>I don't know how they got [*] and then [**].

I don't know why they're bothering to bring in new variables when it's already first order linear and can be solved easily using an integrating factor.

\displaystyle \begin{align*} \frac{dx}{dt} &= b - a\,x \\ \frac{dx}{dt} + a\,x &= b \end{align*}

Now multiplying both sides by the integrating factor $\displaystyle e^{\int{a\,dt}} = e^{a\,t}$ we find

\displaystyle \begin{align*} e^{a\,t}\,\frac{dx}{dt} + a\,e^{a\,t}\,x &= b\,e^{a\,t} \\ \frac{d}{dt} \left( e^{a\,t} \, x \right) &= b\, e^{a\,t} \\ e^{a\,t} \, x &= \int{b\, e^{a\,t}\,dt} \\ e^{a\,t} \, x &= \frac{b}{a}\,e^{a\,t} + C \\ x &= \frac{b}{a} + C\,e^{-a\,t} \end{align*}