Solve the differential equation dy/dx= 2y for y given that when x = 1, y = 1
Thanks
$\displaystyle \frac{dy}{dx} = 2y$
Method 1:
$\displaystyle \frac{dx}{dy} = \frac{1}{2y}$
$\displaystyle x = \int{\frac{1}{2y}\,dy}$
$\displaystyle x = \frac{1}{2}\ln{|y|} + c$
$\displaystyle x - c = \frac{1}{2}\ln{|y|}$
$\displaystyle 2x - C = \ln{|y|}$ where $\displaystyle C = 2c$
$\displaystyle |y| = e^{2x - C}$
$\displaystyle |y| = e^{-C} e^{2x}$
$\displaystyle y = \pm e^{-C} e^{2x}$
$\displaystyle y = A e^{2x}$ where $\displaystyle A = \pm e^{-C}$.
Now letting $\displaystyle x = 1, y = 1$ we find
$\displaystyle 1 = Ae^{2(1)}$
$\displaystyle 1 = Ae^2$
$\displaystyle A = e^{-2}$.
So $\displaystyle y = e^{-2} e^{2x}$
$\displaystyle y = e^{2x - 2}$.
Other possible methods are separation of variables or integrating factor.