Solve this PDE using the characteristic form
$\begin{equation} \frac{\partial w}{\partial t} +t\frac{\partial w}{\partial x}=1 \\ w(x,0)=cos(x) \end{equation}$
My attempt
We know $w(t)=w(x(t),t)$
Then by chain rule
$\frac{d w}{d t}=\frac{\partial w}{\partial x}\times \frac{\partial x}{\partial t} + \frac{\partial w}{\partial t}$
This implies
$\begin{equation} \frac{\partial x}{\partial t}=t \\ \frac{d w}{d t}=1 \end{equation}$
Then:
$x=\frac{t^2}{2}+x_0$
$w=t+c$
This implies
$w(x,t)=c+t$...
Here in this step, i'm a little stuck. can give me a help? Thanks
You're on the right track here. You've found that $x-\frac{1}{2}t^2 = c_1$ and $w-t = c_2$. This means that the solution has the form $f(c_1,c_2) = 0$, or equivalently, $c_2 = g(c_1)$ for some arbitrary $f$ or $g$. Substituting in for $c_{1,2}$,we get $w-t = g(x-\frac{1}{2}t^2) \Rightarrow w(x,t) = t + g(x-\frac{1}{2}t^2)$ as the general solution.
Next, we can substitute the initial values to solve for $g$. Thus, $w(x,0) = g(x) = \cos(x)$, so $w(x,t) = t + \cos(x-\frac{1}{2}t^2)$ is the solution. You can verify this by substitution.