# Solve $u_x + 4xu_y = 1 + u^2$ for $u(0,y)=y$

I got a weird result so I'm not sure I did this right

Let the initial condition be $$u(0, y_0) = y_0$$ for some $$y_0$$

By the method of characteristics let

$$\frac{dx}{ds} = 1 \to x = s + A$$ $$x(s=0) = A = 0 \to x(s) = s$$

$$\frac{dy}{ds} = 4x = 4s \to y = 2s^2 + B$$ $$y(s=0) = B = y_0 \to y(s) = 2s^2+y_0$$

$$\frac{du}{ds} = 1 + u^2 \to \arctan u = s + C \to u(s)=\tan(s+C)$$ $$u(0) = \tan(C) = y_0 \to C=\arctan y_0$$

Now we have that $$u(s) = \tan(s+C) = \tan(x + \arctan y_0)$$

Using $$y(s) = 2s^2+y_0 \to y_0 = y - 2s^2$$

We can substitute in $$u$$ to get $$u(s) = \tan(x + \arctan(y-2s^2)) = \tan(x + \arctan(y-2x^2)) = u(x,y)$$

$$\displaystyle dx=\frac{dy}{4x}=\frac{du}{1+u^2}$$

$$4x\ dx=dy\implies 2x^2-y=c_1$$

$$\displaystyle dx=\frac{du}{1+u^2}\implies x-\tan^{-1}u=c_2$$

The general solution is given by $$f(2x^2-y,x-\tan^{-1}u)=0$$

$$\implies x-\tan^{-1}u=g(2x^2-y)$$

$$u(0,y)=y\implies g(-y)=-\tan^{-1}y\implies g(y)=\tan^{-1}y$$

The answer is $$u=\tan[x-\tan^{-1}(2x^2-y)]$$