# Solve this ordinary differential equation for H

Now I'm building a differential equation model in social science, but I'm not familiar with how to solve.

My model is below:

$$\frac{dH_t}{dt} = a\left(\frac{H_t}{H_t+b} -p\right)$$

I want to solve for $$H_t$$ (I also need the answer when $$t=0, H_0$$).

$$a,b,p$$ are constant.

Could someone solve this equation? Thank you in advance for your time and help.

• Please check and make sure my edits are what you mean to ask. – B. Goddard Feb 14 at 13:44
• Why does your unknown function have a $t$ as subscript? – maxmilgram Feb 14 at 14:45
• Take the H's on the other side of the equation and use partial fractions. – Chrystomath Feb 14 at 14:54
• WolframAlpha provides a solution involving Lambert's W-function. – Harry49 Feb 14 at 15:39

Well, first of all we have:

$$\mathcal{H}'\left(t\right)=\text{a}\cdot\left\{\frac{\mathcal{H}\left(t\right)}{\mathcal{H}\left(t\right)+\text{b}}-\text{p}\right\}\tag1$$

We can write (by dividing both sides by $$\frac{\mathcal{H}\left(t\right)}{\mathcal{H}\left(t\right)+\text{b}}-\text{p}$$):

$$\frac{\mathcal{H}'\left(t\right)}{\frac{\mathcal{H}\left(t\right)}{\mathcal{H}\left(t\right)+\text{b}}-\text{p}}=\text{a}\space\Longrightarrow\space\int\frac{\mathcal{H}'\left(t\right)}{\frac{\mathcal{H}\left(t\right)}{\mathcal{H}\left(t\right)+\text{b}}-\text{p}}\space\text{d}t=\int\text{a}\space\text{d}t\tag2$$

Which gives for the RHS:

$$\int\text{a}\space\text{d}t=\text{a}\cdot t+\text{K}_1\tag3$$

And for the LHS, we substitute $$\text{u}=\mathcal{H}\left(t\right)$$:

$$\int\frac{\mathcal{H}'\left(t\right)}{\frac{\mathcal{H}\left(t\right)}{\mathcal{H}\left(t\right)+\text{b}}-\text{p}}\space\text{d}t=\int\frac{1}{\frac{\text{u}}{\text{u}+\text{b}}-\text{p}}\space\text{d}\text{u}\tag4$$

Now, for the integral we get:

$$\int\frac{1}{\frac{\text{u}}{\text{u}+\text{b}}-\text{p}}\space\text{d}\text{u}=\frac{\text{b}\cdot\ln\left|\text{b}\cdot\text{p}+\text{u}\cdot\left(\text{p}-1\right)\right|}{\left(\text{p}-1\right)^2}-\frac{\text{u}}{\text{p}-1}+\text{K}_2\tag5$$

So, in the end we have:

$$\frac{\text{b}\cdot\ln\left|\text{b}\cdot\text{p}+\mathcal{H}\left(t\right)\cdot\left(\text{p}-1\right)\right|}{\left(\text{p}-1\right)^2}-\frac{\mathcal{H}\left(t\right)}{\text{p}-1}=\text{a}\cdot t+\text{K}\tag6$$

• Thank you for your favor!! – Hayato Feb 15 at 0:06
• and, could someone solve the equation (6) as H(t) = .... where a,b>0 and 0<p<1? now I'm trying this, but I cannot solve it... – Hayato Feb 15 at 0:35