<s>[INST] Solving a Linear First Order Differential Equation 
$u_x+x^2y^4u_y=0 , u(1,y)=cos(2y) \\
  \frac{dy}{dx}= x^2y^4 \implies \int y^{-4} dy = \int x^2 dx \implies -\frac{y^{-3}}{3}= \frac{x^3}{3} +C \\
 C= -1/3(x^3+y^{-3}) \\
u(x,y)=f(C)=f(-1/3(x^3+y^{-3})) \\
\text{Given auxiliary condition: } u(1,y)= f(\frac{-1}{3}(1+y^{-3}))= \cos(2y).$

Solving for the general form of $f$ is where I get stuck.
I am unsure if I can simplify this problem by using the fact that $C$ is a constant. In other words can is the following a valid step:
$C= -1/3(x^3+y^{-3}) \implies C=(x^3+y^{-3})$
Doing so would mean I would then proceed with $f(1+y^{-3})= \cos(2y)$ and thus solve this form of $f$.
 [/INST] $$u_x+x^2y^4u_y=0 \tag 1$$
With the method of characteristics :
$$\frac{dx}{1}=\frac{dy}{x^2y^4}=\frac{du}{0}$$
A first family of characteristic curves comes from necesserarily $du=0 \quad\implies\quad u=c_1$
A second family of characteristic curves comes from $\frac{dx}{1}=\frac{dy}{x^2y^4}$ which is a separable ODE easy to solve : $x^3+\frac{1}{y^3}=c_2$
The general solution of Eq.1 expressed on implicit form is :
$$\Phi\left(\left(x^3+\frac{1}{y^3}\right)\;,\:u\right)=0$$
where $\Phi(X,Y)$ is any differentiable function of two variables.
Or, equivalent, on explicit form :
$$u=F\left(x^3+\frac{1}{y^3}\right) \tag 2$$
where $F(X)$ is any differentiable function.
Then we have to determine which function $F(X)$ satisfies the condition $u(1,y)=\cos(2y)$
$$F\left(1+\frac{1}{y^3}\right)=\cos(2y)$$
In particular $X=1+\frac{1}{y^3}\quad\to\quad y=(X-1)^{-1/3}\quad\to\quad F(X)= \cos(2(X-1)^{-1/3})$
So F(X) is determined. Putting it into Eq.(2) where $X=x^3+\frac{1}{y^3}$ leads to :
$$u=\cos\left(2\left(x^3+\frac{1}{y^3}-1\right)^{-1/3}\right)$$
</s>