# Solution of first order linear differential equation

I have to find the form of the function $h(t)$ in this equation: $$h'(t) -\frac{\theta h(t)}{2} + 1 = 0$$

with $h(T) = C$ where $T$ and $C$ are constants and $T\geq 0$

At first I thought it was a Bernoulli differential equation and I tried: $$V(t) = \frac{1}{h(t)} \Rightarrow V'(t) = \frac{h'(t)}{h(t)^2}$$

My equation becomes worse: $$V'(t) -\frac{\theta}{2} + \frac{1}{V(t)^2} = 0$$

Then I tried with the integrating factor:

$$(e^th(t))' = 2e^th(t) - e^t$$ $$e^th(t) = \int 2e^th(t) - e^t$$

I'm stuck here because $h(t)$ is not a variable, is a function and I have to find how it looks like.

Edit: I forgot: $\theta$ is a constant.

How can I solve this problem?

• what is $\theta$ here? – Dr. Sonnhard Graubner Oct 14 '17 at 16:55
• if $\theta$ is a constant, why do you say that the ODE is not linear ? – G Cab Oct 14 '17 at 17:41
• @GCab OMG you're right! It is linear – Broken_Window Oct 15 '17 at 15:39

## 3 Answers

Try $$h(t)=ce^{\frac{\theta}2t}+\frac2{\theta}.$$ Then $$h'(t)-\frac{\theta}2h(t)+1=\frac{c\theta}2e^{t\frac{\theta}2}-\frac{c\theta}2e^{t\frac{\theta}2}-1+1=0.$$ Furthermore, $h(T)=C$. That is, $$ce^{\frac{\theta}2T}+\frac2{\theta}=C.$$ From where $$c=\left(C-\frac2{\theta}\right)e^{-\frac{\theta}2T}.$$

It is almost a linear equation, it has a free term. The idea is to use the variation of parameters. Write $$h(t) = c \cdot e^{\frac{\theta}{2} t}$$ where $c$ is not a constant, but a new function. You get an equation for $c$ that is rather simple.

Hint.

First of all you need to find the homogeneous equation solution, that is, the solution of

$$h'(t) - Ah(t) = 0$$

Where $A = \theta/2$

This is easy, if you studied the basics. The characteristic polynomial is

$$\lambda - A = 0$$

Hence the solution $\lambda = A$, which gives you the homogeneous solution:

$$y_o(t) = C_1 e^{\lambda t}$$

$$y_o(t) = C_1 e^{At} = C_1 e^{\theta t/2}$$

Now you have to find the general solution...