Mister Exam

# Differential equation dx/dt=r-kx

y() =
y'() =
y''() =
y'''() =
y''''() =

from to

### The solution

You have entered [src]
d
--(x(t)) = r - k*x(t)
dt                   
$$\frac{d}{d t} x{\left(t \right)} = - k x{\left(t \right)} + r$$
x' = -k*x + r
Detail solution
Given the equation:
$$\frac{d}{d t} x{\left(t \right)} = - k x{\left(t \right)} + r$$
This differential equation has the form:
y' + P(x)y = Q(x)

where
$$P{\left(t \right)} = k$$
and
$$Q{\left(t \right)} = r$$
and it is called linear homogeneous
differential first-order equation:
First of all, we should solve the correspondent linear homogeneous equation
y' + P(x)y = 0

with multiple variables
The equation is solved using following steps:
From y' + P(x)y = 0 you get

$$\frac{dy}{y} = - P{\left(x \right)} dx$$, if y is not equal to 0
$$\int \frac{1}{y}\, dy = - \int P{\left(x \right)}\, dx$$
$$\log{\left(\left|{y}\right| \right)} = - \int P{\left(x \right)}\, dx$$
Or,
$$\left|{y}\right| = e^{- \int P{\left(x \right)}\, dx}$$
Therefore,
$$y_{1} = e^{- \int P{\left(x \right)}\, dx}$$
$$y_{2} = - e^{- \int P{\left(x \right)}\, dx}$$
The expression indicates that it is necessary to find the integral:
$$\int P{\left(x \right)}\, dx$$
Because
$$P{\left(t \right)} = k$$, then
$$\int P{\left(x \right)}\, dx$$ =
= $$\int k\, dt = k t + Const$$
Detailed solution of the integral
So, solution of the homogeneous linear equation:
$$y_{1} = e^{C_{1} - k t}$$
$$y_{2} = - e^{C_{2} - k t}$$
that leads to the correspondent solution
for any constant C, not equal to zero:
$$y = C e^{- k t}$$
We get a solution for the correspondent homogeneous equation
Now we should solve the inhomogeneous equation
y' + P(x)y = Q(x)

Use variation of parameters method
Now, consider C a function of x

$$y = C{\left(t \right)} e^{- k t}$$
And apply it in the original equation.
Using the rules
- for product differentiation;
- of composite functions derivative,
we find that
$$\frac{d}{d x} C{\left(x \right)} = Q{\left(x \right)} e^{\int P{\left(x \right)}\, dx}$$
Let use Q(x) and P(x) for this equation.
We get the first-order differential equation for C(x):
$$\frac{d}{d t} C{\left(t \right)} = r e^{k t}$$
So, C(x) =
$$\int r e^{k t}\, dt = \begin{cases} \frac{r e^{k t}}{k} & \text{for}\: k \neq 0 \\r t & \text{otherwise} \end{cases} + Const$$
Detailed solution of the integral
use C(x) at
$$y = C{\left(t \right)} e^{- k t}$$
and we get a definitive solution for y(x):
$$e^{- k t} \left(\begin{cases} \frac{r e^{k t}}{k} & \text{for}\: k \neq 0 \\r t & \text{otherwise} \end{cases} + Const\right)$$
The answer [src]
            k*(C1 - t)
r + e
x(t) = ---------------
k       
$$x{\left(t \right)} = \frac{r + e^{k \left(C_{1} - t\right)}}{k}$$
The classification
separable
1st linear
Bernoulli
almost linear
1st power series
lie group
nth linear constant coeff undetermined coefficients
nth linear constant coeff variation of parameters
separable Integral
1st linear Integral
Bernoulli Integral
almost linear Integral
nth linear constant coeff variation of parameters Integral
To see a detailed solution - share to all your student friends
To see a detailed solution,
share to all your student friends: