# Thread: clarification on differential equation workings

1. ## clarification on differential equation workings

the question is:
Q) Find the general solution of the differential equation dx/dt - x = t+1
A) Here are my workings. Does this look correct?

dx/dt = x + t +1
dx/dt = t(x/t 1 + 1/t)

Let u = x/t 1 + 1/t so du/dx = 1/t so dx = du.t

Equation become: dut/dt = tu
du/u = dt
ln(u) = t + C
u = exp(t + C)
u = Aexp(t)

As u = x/t 1 + 1/t rearranging gives x = ut - t - 1

Putting u into equation gives final answer of x = Aexp(t)t - t - 1

2. Originally Posted by ben.mahoney@tesco.net
the question is:
Q) Find the general solution of the differential equation dx/dt - x = t+1
A) Here are my workings. Does this look correct?

dx/dt = x + t +1
dx/dt = t(x/t 1 + 1/t)

Let u = x/t 1 + 1/t so du/dx = 1/t so dx = du.t

Equation become: dut/dt = tu
du/u = dt
ln(u) = t + C
u = exp(t + C)
u = Aexp(t)

As u = x/t 1 + 1/t rearranging gives x = ut - t - 1

Putting u into equation gives final answer of x = Aexp(t)t - t - 1

It is a first order linear DE, so you can solve it using an integrating factor.

$\frac{dx}{dt} - x = t + 1$.

The integrating factor is $e^{\int{-1\,dt}} = e^{-t}$.

Multiply both sides of the equation by the integrating factor.

$e^{-t}\frac{dx}{dt} - xe^{-t} = e^{-t}(t + 1)$

Notice that the left hand side is the product rule expansion of $\frac{d}{dt}(xe^{-t})$.

So $\frac{d}{dt}(xe^{-t}) = e^{-t}(t + 1)$

$xe^{-t} = \int{e^{-t}(t + 1)\,dt}$

Solve this integral using integration by parts.

$\int{u\,dv} = uv - \int{v\,du}$.

Let $u = t + 1$ so that $du = 1$

Let $dv = e^{-t}$ so that $v = -e^{-t}$.

Therefore

$xe^{-t} = -e^{-t}(t + 1) - \int{-e^{-t}\,dt}$

$xe^{-t} = -e^{-t}(t + 1) - e^{-t} + C$

$xe^{-t} = -e^{-t}(t + 2) + C$

$x = Ce^t - (t + 2)$

$x = Ce^t - t - 2$.

3. Originally Posted by ben.mahoney@tesco.net
the question is:
Q) Find the general solution of the differential equation dx/dt - x = t+1
A) Here are my workings. Does this look correct?

dx/dt = x + t +1
dx/dt = t(x/t 1 + 1/t)

Let u = x/t 1 + 1/t so du/dx = 1/t so dx = du.t

Equation become: dut/dt = tu
du/u = dt
ln(u) = t + C
u = exp(t + C)
u = Aexp(t)

As u = x/t 1 + 1/t rearranging gives x = ut - t - 1

Putting u into equation gives final answer of x = Aexp(t)t - t - 1
Check that your solution satisfies the original differential equation, now tell us if it is correct.

CB