Solve $u_t+\sin(t) u_x=0$ with initial condition $u(x_0,0)=x_0^2$

initial-value-problemspartial differential equations

I'm starting to learn PDEs and I'm trying to solve the transport equation $u_t+\sin(t) u_x=0$ with initial condition $u(x_0,0)=x_0^2$ by the method of characterisitics.

So I define $\xi'(t)=\sin(t)$ which has solution $\xi(t)=-\cos(t)+x_0$, so consider a characteristic that goes through $x$ at time $t$, then $x=\xi(t)=-\cos(t)+x_0$ and so $x_0=x+\cos(t)$

Now as $u$ is constant along this charcteristic we have $u(x,t)=u(x_0,0)=x_0^2=(x+\cos(t))^2$ and so $$u(x,t)=(x+\cos t)^2$$ which satisfies the PDE, but shouldn't it also satisfy $u(x,0)=x^2$ from the initial condition or does this only need to be satisfied by $x_0$? Basically I'm asking that if I was given this PDE how would I show that it satisfies the initial conditions, $u(x_0,0)=x_0^2$? Or have I calculated it incorrectly?

Best Answer

Your constant of integration is wrong. The characteristic going through $(x,t)$ hits the axis $t=0$ at $x_0=x+\cos t-1$ and your solution is $u(x,t)=(x+\cos t-1)^2$

Related Question