What are some ways to solve $\frac{dx}{dt} = x + 1, x(0) = x_o$

107 Views Asked by At

I want to solve a simple ODE

$\dfrac{dx}{dt} = x + 1, x(0) = x_o$

I currently know of three ways to solve this from the top of my head:

  1. Method of integrating factors, multiple entire expression by $e^{-t}$
  2. Laplace transform
  3. Separation of variables, divide both sides by $x+1$ then integrate both sides

I think there is a method just by guessing. However, I have forgotten the rule for guessing the solution of non-homogeneous equations such as this one.

Have I missed anything else?

5

There are 5 best solutions below

2
On BEST ANSWER

Differentiate twice and obtain $\frac{d^2x}{dt^2}=\frac{dx}{dt}$. So we know that $\frac{dx}{dt}=c\cdot exp(t)$. Hence $x=c\cdot \exp(t) + d$. Now solve for $c$ and $d$.

5
On

You have $ \frac {dx}{dt} $ = x+1
Just rearrange a bit: (taking care that x $\neq $ -1) $$ \frac{dx}{x+1} = dt $$
Now, integrate on both sides:
you get $$ln(x+1)=t+c$$
or $$t=ln(x+1)-c $$ where c is a constant.

Also, given that x(0)=$x_0$
put x=0 in this equation.
$$x_0=ln(0+1)-c$$
i.e. $$x_0=-c$$
or, $$c=-x_0$$
put c back to our equation: $$ln(x+1)=t-x_0$$
So, $$t=ln(x+1)+x_0$$
is the answer.

0
On

Guessing, or method of undetermined coefficients: The inhomogeneity in $\dot x-x=1$ corresponds to an exponential factor $0$ which is not a root of the characteristic polynomial, thus try $y_p=A$ to find $A=-1$ for a general solution $x=-1+Ce^{-t}$.

And fifth, you can always try a power series expansion.

0
On

Let $X=x+1$. Then Suddenly, its an exponential $$ X' = X ,\quad X(0) = x_0+1$$ So I guess we should write down the final answer $$x(t) = (x_0+1)e^t-1$$

1
On

This is a non homogenous (first order) linear ode.

$$x’-x=1$$

The characteristic polynomial corresponding to the homogenous equation is,

$$r-1=0$$

So $Ce^{rt}=Ce^{t}$ is the solution to the homogenous equation. Now we may use, say, the method of undetermined coefficients to solve for a particular solution.

Guess a constant for $x$, get that that constant is $-1$.

So,

$$x=Ce^{t}-1$$