The question is solve the following partial differential equation using the method of characteristic $\frac{\partial{u}}{\partial{x}}-\frac{\partial{u}}{\partial{t}}=2t$, with the condition $u=u(x,t)$ subject to $u(x,2x+1)=e^{x}$.
My attempt:
I first calclated that $t=c-x$ where $c$ is a constant, then i rearranged to find that $c=t+x$ then let $\zeta=x$ and $\eta=t+x$, then calculated that $\frac{\partial{u}}{\partial{x}}=\frac{\partial{u}}{\partial{\zeta}}+\frac{\partial{u}}{\partial{\eta}}$ and that $\frac{\partial{u}}{\partial{t}}=\frac{\partial{u}}{\partial{\eta}}$, i then proceeded to substitute these into the pde to get that $\frac{\partial{u}}{\partial{\zeta}}=2t$, and then wrote that $\frac{\partial{u}}{\partial{\zeta}}=2(\eta+\zeta)$ since $t=\eta+\zeta$ i then intergrated to get that $u=2\eta\zeta+\zeta^{2}+f(\eta)$ which implies that $ u=2(t+x)(x)+x^{2}+k(t+x)$
Now the boundary condition given was that $u(x,2x+1)=e^{x}$ so $e^{x}=2((2x+1)+x)x+x^{2}+k(3x+1)=7x^{2}+2x+k(3x+1)$ then I let $z=3x+1$ and then tried to rearrange for $k(z)$ but i dont think this is correct, could someone please help me with this last bit? Thank you for taking the time to read through the post.
$$\frac{\partial{u}}{\partial{x}}-\frac{\partial{u}}{\partial{t}}=2t$$ System of characteristic differential equations : $\quad \frac{dx}{1}=\frac{dt}{-1}=\frac{du}{2t}$
First family of characteristic curves from $\quad\frac{dx}{1}=\frac{dt}{-1}\quad\to\quad x+t=c_1$
Second family of characteristic curves from $\quad\frac{dt}{-1}=\frac{du}{2t} \quad\to\quad u+t^2=c_2$
General solution of the PDE : $\quad u+t^2=F(x+t)$
$F(X)$ is any differentiable function, where $X=x+t$.
$$u(x,t)=-t^2+F(x+t)$$
Condition :
$u\left(x,t=(2x+1)\right)=e^{x}= -(2x+1)^2+F\left(x+(2x+1)\right)$
$e^{x}= -(2x+1)^2+F(X)$ with $X=3x+1 \quad\to\quad x=\frac{X-1}{3}$
$e^{\frac{X-1}{3}}= -\left(2\frac{X-1}{3}+1\right)^2+F(X) \quad\to\quad F(X)=e^{\frac{X-1}{3}}+\left(\frac{2X+1}{3}\right)^2$
So, the function $F$ is determined. Putting it into the general solution with $X=x+t$ leads to the particular solution fitting the specified condition : $u(x,t)=-t^2+e^{\frac{(x+t)-1}{3}}+\left(\frac{2(x+t)+1}{3}\right)^2$
$$u(x,t)=-t^2+e^{\frac{x+t-1}{3}}+\left(\frac{2x+2t+1}{3}\right)^2$$