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,
{"ft_lang_label":"__label__en","ft_lang_prob":0.7114564,"math_prob":0.99217135,"size":2781,"snap":"2019-51-2020-05","text_gpt3_token_len":909,"char_repetition_ratio":0.19985595,"word_repetition_ratio":0.07025761,"special_character_ratio":0.46314275,"punctuation_ratio":0.20033112,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99720186,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-22T13:41:49Z\",\"WARC-Record-ID\":\"<urn:uuid:7a7ddfe8-7e1b-46f5-b677-fd0620bfd656>\",\"Content-Length\":\"46668\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e1e46f6f-3d93-457f-822e-6c3f9869fc61>\",\"WARC-Concurrent-To\":\"<urn:uuid:c8157fda-b827-4551-b0ce-f6b4d22f86da>\",\"WARC-IP-Address\":\"140.177.205.73\",\"WARC-Target-URI\":\"http://forums.wolfram.com/mathgroup/archive/2006/Feb/msg00314.html\",\"WARC-Payload-Digest\":\"sha1:3F44JT2ZIQR5WXUZZNJEXAERJU2F6TTZ\",\"WARC-Block-Digest\":\"sha1:K2MSCNKL34X2BCNX3VJP5CQROENGLJF5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250607118.51_warc_CC-MAIN-20200122131612-20200122160612-00125.warc.gz\"}"}