Using initial condition to find arbitrary constant

1.5k Views Asked by At

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?

2

There are 2 best solutions below

0
On

by integration we get $$y(x)=\frac{a}{b}+e^{-bx}C$$ and we get $$y(0)=a/b+C=0$$ thus we have $$C=-\frac{a}{b}$$

0
On

$$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}}}$$