       Re: initial condition in using dsolve

• To: mathgroup at smc.vnet.net
• Subject: [mg64394] Re: [mg64316] initial condition in using dsolve
• Date: Wed, 15 Feb 2006 03:32:13 -0500 (EST)
• References: <200602110832.DAA18297@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```On Sat, 11 Feb 2006, rudy wrote:

> Hello,
> I'm trying to use DSolve tu obtaine the solution of the PDE:
> eq={D[f[x, t], t]+ v*D[f[x, t], x]==0, f[x, 0]==fo[x]}
>
> but with the instruction
>
> DSolve[eq, f, {x, t}]
>
> Mathematica doesn't resolve.
> It's strange because the solution is known:
>
> f[x,t] = f[x- v t,0]
>
> If I do:
>
> eq={D[f[x, t], t]+ v*D[f[x, t], x]==0}
> and
> DSolve[eq, f, {x, t}]
> it works:
>
> out > {f -> Function[{x, t}, C[(t v - x)/v]]}
>
> I don't understand why it works in the second case and not in the first...
> can anybody help?
> Regards
> Rudy
>
Hello Rudy,

At present, the DSolve function can find the general solution for
a linear first-order partial differential equation such as the one
considered by you. However, it is currently not possible to solve
initial-value problems for such equations. For this reason, In
below returns unevaluated while In returns a result.

==============================================

In:= \$Version

Out= 5.2 for Linux (June 27, 2005)

In:=  eq = {D[f[x, t], t] + v*D[f[x, t], x] == 0, f[x, 0] == fo[x]};

In:= DSolve[eq, f, {x, t}]//InputForm

Out//InputForm=
DSolve[{Derivative[0, 1][f][x, t] + v*Derivative[1, 0][f][x, t] == 0,
f[x, 0] == fo[x]}, f, {x, t}]

In:=  eq = {D[f[x, t], t] + v*D[f[x, t], x] == 0};

In:= (sol = DSolve[eq, f, {x, t}]) // InputForm

Out//InputForm= {{f -> Function[{x, t}, C[(t*v - x)/v]]}}

===============================================

We hope to include the functionality for solving initial-value
problems for PDEs in a future release.

an expression for the solution f[x, t] of the initial-value
problem as follows.

=============================================

In:= f0[x] == (f[x, t]/.sol[]/.{t-> 0})

x
Out= f0[x] == C[-(-)]
v

In:= f[x_, t_] = (f[x, t] /. sol[] /. {C[a_] :> f0[-v*a]})

Out= f0[-(t v) + x]

=============================================

We can now verify that this solution satisfies the equation and
the initial condition.

==========================================

In:= f[x, 0]

Out= f0[x]

In:= D[f[x, t], t] + v*D[f[x, t], x]

Out= 0

=======================================

Sorry for the inconvenience caused by this limitation.

Sincerely,