[Date Index]
[Thread Index]
[Author Index]
Re: Partial diff equations
*To*: mathgroup at smc.vnet.net
*Subject*: [mg58546] Re: [mg58510] Partial diff equations
*From*: Devendra Kapadia <dkapadia at wolfram.com>
*Date*: Wed, 6 Jul 2005 03:11:35 -0400 (EDT)
*References*: <200507050557.BAA29453@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
On Tue, 5 Jul 2005, David Boily wrote:
> I have a not difficult to integrate but huge system of partial
> differential equations that I would never attempt to solve by hand. So I
> tried to feed it to mathematica and got the message bellow. I got annoyed and
> tested DSolve with a trivial problem only to realize that, apparently,
> mathematica is not very good when it comes to partial diff equations.
>
> Indeed, how come mathematica can't solve this simple system:
>
> DSolve[{D[f[x,y],x]==2 x y^2, D[f[x,y],y]==2 x^2 y}, f[x,y], {x, y}]
>
> the solution is trivial (f[x,y]=x^2 y^2), but if I enter the above
> command I get:
>
> DSolve::overdet:
> The system has fewer dependent variables than equations, so is
> overdetermined.
>
> any info would be appreciated,
>
> Thanks,
>
> David Boily
> Centre for Intelligent Machines
> McGill University
> Montreal, Quebec
>
Hello David,
At present, DSolve can handle general first order partial differential
equations (they can be linear, quasilinear or nonlinear) and a limited
class of second order partial differential equations. A fairly
detailed description of this functionality is available in the
Advanced Documentatation for DSolve in Mathematica 5.1.1.
There is no support for systems of partial differential equations such
as the one given by you, although this is planned for a future release.
One issue with solving a system of this type is that it is overdetermined
(that is, there are more equations than unknowns) and hence there may
be no solution. The DSolve::overdet message in earlier versions indicates
this difficulty. It is not generated in Mathematica 5.1 because the
message is confusing in situations where a solution does exist.
Here are two suggestions for solving the system sent by you.
We begin by setting up the system.
====================================================
In[1]:= $Version
Out[1]= 5.1 for Linux (February 20, 2005)
In[2]:= sys = {D[f[x, y], x] == 2*x*y^2,
D[f[x, y], y] == 2*x^2*y};
====================================================
Next, we solve the first member of the system, which is a
single first order linear partial differential equation,
using DSolve.
================================================
In[3]:= sol1 = DSolve[sys[[1]], f, {x, y},
GeneratedParameters -> g]
2 2
Out[3]= {{f -> Function[{x, y}, x y + g[1][y]]}}
==============================================
Here, g[1][y] is an arbitrary function of y. It can be determined by
using the second member of the system to arrive at the solution of
the system.
================================================
In[4]:= sol2 = DSolve[(D[f[x, y], y] /.
sol1[[1]]) == 2 x^2 y, g[1], {y}]
Out[4]= {{g[1] -> Function[{y}, C[1]]}}
In[5]:= f[x, y] /. sol1[[1]] /. sol2[[1]]
2 2
Out[5]= x y + C[1]
=================================================
A slightly different approach is to look for polynomial
solutions of the system as follows.
================================================
In[1]:= f[x_, y_] = Sum[c[i, j]*x^i*y^j, {i, 0, 3}, {j, 0, 3}];
In[2]:= InputForm[Solve[(#1 == 0 & ) /@
Flatten[CoefficientList[{D[f[x, y], x] -
2*x*y^2, D[f[x, y], y] - 2*x^2*y}, {x, y}]],
Flatten[Table[c[i, j], {i, 0, 3}, {j, 0, 3}]]]]
Solve::svars: Equations may not give solutions for all "solve" variables.
Out[2]//InputForm=
{{c[0, 1] -> 0, c[0, 2] -> 0, c[0, 3] -> 0, c[1, 0] -> 0, c[1, 1] -> 0,
c[1, 2] -> 0, c[1, 3] -> 0, c[2, 0] -> 0, c[2, 1] -> 0, c[2, 2] -> 1,
c[2, 3] -> 0, c[3, 0] -> 0, c[3, 1] -> 0, c[3, 2] -> 0, c[3, 3] -> 0}}
In[3]:= f[x, y] /. %[[1]]/. c[0,0] -> c
2 2
Out[3]= c + x y
============================================================
Sorry for the inconvenience caused by this limitation.
Sincerely,
Devendra Kapadia,
Wolfram Research, Inc.
Prev by Date:
**Re: Function to handle array with variable _number_ of dimensions?**
Next by Date:
**Re: Function to handle array with variable _number_ of dimensions?**
Previous by thread:
**Re: Partial diff equations**
Next by thread:
**Re: Partial diff equations**
| |