[Math] Using initial condition to find arbitrary constant

initial-value-problemsordinary differential equations

I'm confused as to how to find the arbitrary constant using the initial condition given.

This is the equation I have to solve,

$\frac{dy}{dx}=a-by$, with initial condition $y(0)=0$. Also, a and b are constants.

I've used integration by separation to get,

$a-by=Ae^{-bx}$, where $A=e^c$.

I'm not sure what to do next?

Best Answer

$$y'(x)=\text{a}-\text{b}y(x)\Longleftrightarrow\int\frac{y'(x)}{\text{a}-\text{b}y(x)}\space\text{d}x=\int1\space\text{d}x\Longleftrightarrow-\frac{\ln\left|\text{a}-\text{b}y(x)\right|}{\text{b}}=x+\text{C}$$

So, when $y(0)=0$:

$$-\frac{\ln\left|\text{a}-\text{b}\cdot0\right|}{\text{b}}=0+\text{C}\Longleftrightarrow\text{C}=-\frac{\ln\left|\text{a}\right|}{\text{b}}$$

So, we get:

$$-\frac{\ln\left|\text{a}-\text{b}y(x)\right|}{\text{b}}=x-\frac{\ln\left|\text{a}\right|}{\text{b}}\Longleftrightarrow\left|\text{a}-\text{b}y(x)\right|^{-\frac{1}{\text{b}}}=e^x\left|\text{a}\right|^{-\frac{1}{\text{b}}}$$

Related Question