Initial Value Problems
Discussion
All the examples we have worked so far have been to find all the solutions. We will now consider how to solve an initial value problem. Consider the example $$ \begin{align} \frac{dy}{dx}=xy-x \\ y(0)=2. \end{align}$$ We know how to find all the solutions to $\displaystyle\frac{dy}{dx}=xy-x$, but we want to find the particular solution that satisfies $y(0)=2$. To do this we just take the general solution, which is $y(x)=ke^{x^2/2}+1$ and plug in the condition $y(0)=2$. This yields $2=k+1$. We solve this equation for $k$ to get $k=1$ and the solution to the initial value problem is $y=e^{x^2/2}+1$. This technique works not just for separable equations but for all initial value problems.Paradigm
Solve the initial value problem $\displaystyle\frac{dy}{dx}=xy+x^2y,\qquad y(0)=2.$ FIRST: Find the general solution Step 1: $\displaystyle \frac{dy}{y}=x+x^2\,dx$ Step 2: $$ \begin{align} \int \frac{dy}{y}&=\int x+x^2\,dx \\ \log|y|&=x^2/2+x^3/3+C \end{align} $$ Step 3: $\displaystyle y=ke^{x^2/2+x^3/3}$, ($k=\pm e^C$) Step 4: We divided by $y$ and $y=0$ is a solution, but it is included in the general solution with $k=0$. There are no singular solutions. SECOND: Plug in the initial value and solve for the arbitrary constant. $$ \begin{align} y(0)=ke^0 &{\buildrel\text{set}\over =} 2 \\ k&=2 \end{align} $$ So $y(x)=2e^{x^2/2+x^3/3}$.Example
Solve the initial value problem $\displaystyle\frac{dy}{dx}=xe^y$, $y(0)=1$. FIRST: Find the general solution. Step 1: $\displaystyle e^{-y}\,dy=x\,dx$. Step 2: $$\begin{align} \int e^{-y}\,dy&=\int x\,dx \\ -e^{-y}&=x^2/2+C \end{align} $$ Step 3: $y=-\log(-x^2/2-C)$. SECOND: Plug in initial value and solve for the arbitrary constant. $$ \begin{align} y(0)=-\log(-0^2-C) &{\buildrel\text{set}\over =} 1 \\ \log(-C)&=-1 \\ -C&=e^{-1} \\ C&=-e^{-1} \end{align} $$ So $y(x)=-\log(-x^2/2+e^{-1})$.If you have any problems with this page, please contact bennett@math.ksu.edu.
©2010, 2014 Andrew G. Bennett