# Differential Equation Breaks Euler Method

Solving ${dy\over dx} = 2y^2$, $y(0)=2$ analytically yields $y(8)= -2/31$, but from using Euler's method and looking at the slope field, we see that $y(8)$ should be a really large positive answer. Why?

Differential equation: \begin{align} &\frac{dy}{dx}=2y^2\\ &\frac{dy}{y^2} = 2\, dx\\ -&\frac{1}{y} = 2x + c\\ -&\frac{1}{2} = c\\ -&\frac{1}{y}=2x-\frac{1}{2}\\ &\frac{1}{y}=-2x+\frac{1}{2}\\ &y=\frac{1}{-2x+\frac{1}{2}}\\ &y=\frac{2}{-4x+1}\\ y(8)=-2/31\end{align}

-
The $y$'s in the right sides of your second group of formulas should be $x$'s. What happens to $y(x)$ as $x \to 1/4$? – Robert Israel Nov 16 '11 at 18:01

As you found, the solution is $y={2\over 1-4x}$, which has a vertical asymptote at $x=1/4$. In the slope field, you should be able to convince yourself that such a function can indeed "fall along the slope vectors". The curve will shoot up to infinity as you approach $x=1/4$ from the left. To the right of $x=1/4$ the curve "comes from below".
The graph of $y={2\over 1-4x}$ over $[0,1]$ is shown below:
$\lim_{x\rightarrow 1/4^-} {2\over 1-4x}= \infty$ and $\lim_{x\rightarrow 1/4^+} {2\over 1-4x}=-\infty$. $y$ is discontinuous at $x=1/4$. I added the graph to the post; do you see it now? – David Mitra Nov 16 '11 at 18:57
Although the two branches of the curve come from the same formula, they are not really parts of the same solution from the point of view of the differential equation: we'd have to say that the solution of your initial value problem ceases to exist at $x=1/4$, where it "blows up". – Robert Israel Nov 17 '11 at 8:19