# [SOLVED]Non-homogeneous equation

#### evinda

##### Well-known member
MHB Site Helper
Hello!!! I want to solve the non-homogeneous equation $u_t+uu_x=0$ with the initial condition $u(x,0)=x$. Also I want to draw some of the characteristic curves.

I have tried the following so far:

The characteristic curves for $u_t+uu_x=0$ are the curves that are given by the solutions of the ode $\frac{dx}{dt}=u(x,t)$.

We have that $\frac{d}{dt}[u(x(t),t)]=u_t+uu_x=0$ and so $u(x(t),t)=c$.

We consider the line that passes through the points $(x_0,0)$ and $(x,t)$.
The slope of the line is

$\frac{x-x_0}{t-0}=\frac{dx}{dt}=u(x,t)=u(x_0,0)=x_0$, thus $x-x_0=tx_0 \Rightarrow x_0=\frac{x}{t+1}$.

Then we would get that $u(x,t)=\frac{x}{t+1}$. But this cannot be right, since $u$ should be only a function of $x$.

So have I done something wrong? #### Klaas van Aarsen

##### MHB Seeker
Staff member
Hey evinda!! Isn't $u(x,t)$ supposed to be a function of both x and t?
What's the reason that it would only depend on x? #### evinda

##### Well-known member
MHB Site Helper
Hey evinda!! Isn't $u(x,t)$ supposed to be a function of both x and t?
What's the reason that it would only depend on x? I thought so, since $u(x(t),t)=c$. So is the solution that I found right? #### Klaas van Aarsen

##### MHB Seeker
Staff member
I thought so, since $u(x(t),t)=c$. So is the solution that I found right? Yes, your solution is correct.
And a level curve of the solution depends on both x and y. #### evinda

##### Well-known member
MHB Site Helper
Yes, your solution is correct.
And a level curve of the solution depends on both x and y. Ok... But do we have to take into consideration that $\frac{x(t)}{t+1}=c$ when drawing the characteristic curves ? If so, how? #### Klaas van Aarsen

##### MHB Seeker
Staff member
Ok... But do we have to take into consideration that $\frac{x(t)}{t+1}=c$ when drawing the characteristic curves ? If so, how? We can rewrite it as $x(t)=ct+c$, can't we?
That is a straight line for each value of c that we pick. #### evinda

##### Well-known member
MHB Site Helper
We can rewrite it as $x(t)=ct+c$, can't we?
That is a straight line for each value of c that we pick. The functions $x(t)$ that we find are called characteristic lines, right? Now, I saw that I am supposed to draw some of the characteristic lines.  So the above is a desired graph, isn't it? #### Klaas van Aarsen

##### MHB Seeker
Staff member
The functions $x(t)$ that we find are called characteristic lines, right? Now, I saw that I am supposed to draw some of the characteristic lines. So the above is a desired graph, isn't it? Yep. All good. #### evinda

##### Well-known member
MHB Site Helper
Yep. All good. Nice, thank you!!! 