Solution curves for the equation $y'=max(x,y)$, the larger of the two values $x$ and $y$ How do I find and sketch the solution curves for the equation $y'=max(x,y)$? I don't even know what is a closed function form of the expression max(x,y), let alone going about solving the differential equation?! Could someone provide a graphical output of the solution curves? Wolframalpha doesn't seem to be able to do it, and I don't have any mathematical software handy.
Any ideas?
 A: The form (locally!) of the solution of 
$$y'=\max\{x,y\}$$
obviously depends on which side of the line $y=x$ your solution is moving. 
In Northwest we have $y'=y$, so a solution looks like $y=Ce^x$ for some constant $C$. We note that, if $C\le 1/e$, then it can be written in the form $C=Ae^{-A}$. This can easily be proven by studying the image of the function $xe^{-x}$. This is important for us, because with $C=Ae^{-A}$ we can rewrite the solution in the form
$$
y=Ce^x=Ae^{(x-A)},
$$
which will pass through the point $(x,y)=(A,A)$.
In Southeast we have $y'=x$, so a solutions looks like $y=\frac12x^2+C$ for some constant $C$.
A solution of your equation will switch from one form to the other every time it crosses the line $y=x$. A solution will be determined by an initial point $P$. If $P=(a,b)$ is in the Northwest, the solution begins to follow the curve
$$
y=be^{x-a}=be^{-a}e^x.
$$
If here $be^{-a}> e^{-1}$, it is easy to show that the solution will never cross the boundary $y=x$, i.e. the solution will be completely in the NW-side. If we have $be^{-a}=1/e$, then the curve will just graze the line $y=x$ without crossing it (see the figure below).
If $be^{-a}<1/e$, we can follow the earlier idea, and rewrite the NW-solution
in the form $y=Ae^{(x-A)}$, and the solution will eventually reach the boundary at the point $(A,A)$. Remembering that then $y'(A)=A$, we can deduce that if $A<1$, then at this point we will be crossing over from NW to SE (when $x$ increases). OTOH, if $A>1$, then we will be crossing from SE to NW side.
If we cross over to SE at the point $(A,A)$, then the solution 
$$
y=\frac12x^2+\frac{2A-A^2}2
$$
is the way to go. This intersects the line $y=x$ at the points $(A,A)$
and $(2-A,2-A)$. Here we can limit ourselves to $A\ge1$, as then we can say that
the crossing point $(2-A,2-A)$ lies to the left of $(A,A)$. So the type of solutions that switch sides are of the form
$$
y=\begin{cases}
(2-A)e^{(x-2+A)},&\text{when $x\le 2-A$,}\\
\frac12x^2+\frac{2A-A^2}2,&\text{when $2-A\le x\le A$,}\\
Ae^{(x-A)},&\text{when $x\ge A.$}
\end{cases}
$$
Obviously there are no solutions that would stay forever in the Southeast - those parabolas will always reach the boundary line.
In the figure below three solutions are shown. The solution $y=e^{x-1}$ that just touches the grey boundary line. The curious solution corresponding to $A=2$ above that first follows the negative $x$-axis, then follows the parabola $y=x^2/2$ to the point $(2,2)$, and then switches to exponential growth. The third depicted solution starts below the $x$-axis, crosses the boundary at $(-2,-2)$, follows the parabola $y=(x^2-8)/2$ to the point $(4,4)$, and then continues exponentially.

Note that all the solutions are everywhere differentiable, as $\max\{x,y\}$ is continuous on the entire plane. They won't be twice differentiable unless they stay in NW. This is because the SE-solution has second derivative equal to $1$ everywhere, and a NW-solution has second derivative equal to $A$ at the crossing point $(A,A)$.
