# Solving $u_t + x^2tu_x = 0$ with initial condition $u_0(x) = \cos x$; am I on the right track?

Solve $u_t + x^2tu_x = 0$ with initial condition $u_0(x) = \cos x$

I first started by finding the vector field for where $u$ is constant which is $$(x^2t,1)$$ and so I'm looking for a set of curves such that $$\frac{d}{d\tau}(x(\tau), t(\tau)) = (x(\tau)^2t(\tau), 1)$$ and so I got that $$t(\tau) = \tau$$ and so after inverting $t(\tau) = \tau$ we're looking for a function $x(t)$ such that $$\dot{x}(t) = x(t)^2t$$ but I can't think of such a function as this requires solving a non-linear ODE, am I on completely the wrong track?

EDIT

I have thought of a function! It wasn't too complicated after all, the function is $x(t) = -2t^{-2}$. I will attempt the solution now and make another edit.

EDIT 2: On second thoughts I'm missing the constant $c$, but when I make $x(t) = -2t^{-2} + c$ it makes the function really complicated when squaring etc.. does this matter?

-
In response to Edit 2, you cannot simply add the $+c$ as an afterthought -- you have to add it as soon as you do the integration. The result is $x(t)=\frac{2}{c-t^2}$. – kiwi May 12 '12 at 15:49
Your I.C. is not clear. Does it means $u(x,0)=\cos x$ ? – doraemonpaul Jun 30 '12 at 22:03
This question has been solved perfectly. Hope that the asker has been diving enough and accept the answer at an early date. – doraemonpaul Sep 10 '12 at 1:31

$u_t+x^2tu_x=0$

$\dfrac{u_t}{t}+x^2u_x=0$

$\dfrac{dt}{ds}=\dfrac{1}{t}$ , letting $t(0)=0$ , we have $\dfrac{t^2}{2}=s$

$\dfrac{dx}{ds}=x^2$ , letting $x(0)=\dfrac{1}{x_0}$ , we have $\dfrac{1}{x}=-s+x_0=-\dfrac{t^2}{2}+x_0$

$\dfrac{du}{ds}=0$ , letting $u(0)=f(x_0)$ , we have $u(x,t)=f(x_0)=f\biggl(\dfrac{t^2}{2}+\dfrac{1}{x}\biggr)$

$u_0(x)=\cos x$ :

$f\left(\dfrac{1}{x}\right)=\cos x$

$f(x)=\cos\dfrac{1}{x}$

$\therefore u(x,t)=\cos\dfrac{1}{\dfrac{t^2}{2}+\dfrac{1}{x}}=\cos\dfrac{2x}{xt^2+2}$

-