Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NDSolve PDE problem

182 views
Skip to first unread message

Ilya Valmianski

unread,
Mar 13, 2013, 4:18:25 AM3/13/13
to
Hello All,

I am having a problem using NDSolve. I get the error:

"NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable."

The input is the following (I marked different entries with new lines for readability):

NDSolve[
{
1+10 DiracDelta[t] DiracDelta[-10+z]+10 DiracDelta[-5+z]==-10 (x^(0,2))[t,z]+(1+10 DiracDelta[-5+z]) (x^(2,0))[t,z],

x[0,z]==1/20 ((40-z) z+20 (z+(5-z) HeavisideTheta[-5+z])),

x[t,0]==0
}

,x[t,z],

{t,0,Sqrt[10]},

{z,0,10}

]

Essentially I have a second order PDE for x[t,z], and I define x[t=0,z] and x[t,z=0]. As far as I understand this is sufficient to solve this equation, or do I need more boundaries? Is my syntax wrong?

Best,

Ilya



Alexei Boulbitch

unread,
Mar 15, 2013, 1:46:00 AM3/15/13
to
Hello All,

I am having a problem using NDSolve. I get the error:

"NDSolve::ivone: Boundary values may only be specified for one independent
variable. Initial values may only be specified at one value of the other in dependent variable."

The input is the following (I marked different entries with new lines for readability):

NDSolve[
{
1+10 DiracDelta[t] DiracDelta[-10+z]+10 DiracDelta[-5+z]==-10 (x^(0,2))[t,z]+(1+10 DiracDelta[-5+z]) (x^(2,0))[t,z],

x[0,z]==1/20 ((40-z) z+20 (z+(5-z) HeavisideTheta[-5+z])),

x[t,0]==0
}

,x[t,z],

{t,0,Sqrt[10]},

{z,0,10}

]

Essentially I have a second order PDE for x[t,z], and I define x[t=0,z] and x[t,z=0]. As far as I understand this is sufficient to solve this equation, or do I need more boundaries? Is my syntax wrong?

Best,

Ilya

Hi, Ilia,

I confirm the unreasonable message of Mathematica reported by Ilia. First, there is no discrepancy between the initial and the boundary conditions, and they are given according to the NDSolve rules.

I also checked, if Mathematica did not got "scared" by all DiracDeltas and HeavisideTheta functions. To this end I replaced these functions by more trivial ones that in no case may cause Mathematica problems:

Clear[x, z, t];
eq1 = 1 + 10 Exp[-t^2] Exp[-(-10 + z)^2] +
10 Exp[-(-5 + z)^2] == -10*\!\(
\*SubscriptBox[\(\[PartialD]\), \({z, 2}\)]\ \(x[t, z]\)\) + (1 +
10 Exp[-(-5 + z)^2])*\!\(
\*SubscriptBox[\(\[PartialD]\), \({t, 2}\)]\ \(x[t, z]\)\);
eq2 = x[0, z] == z;
eq3 = x[t, 0] == 0;

NDSolve[{eq1, eq2 , eq3}, x[t, z], {t, 0, Sqrt[10]}, {z, 0, 10}]

In this case, however, like in the original case reported by Ilia the equation is not solved and the message
reads:

NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable

Is it a bug?

Alexei






Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44

e-mail: alexei.b...@iee.lu





debguy

unread,
Apr 1, 2013, 12:57:41 AM4/1/13
to
I'm not convicned it's a bug. It appears to me your begging the
allowable usage (see below). You need to arrange your work so it is
in one of the many forms Mathematica allows is my guess. I see no
reason you can't.

"Essentially I have a second order PDE for x[t,z], and I define
x[t=0,z] and x[t,z=0]"
You define what? x[t=0,z] isn't a proper definition. And I doubt the
nds algorithm is made to check your function at every value to see
whether a new independant variables results and changes (everything).

>From the excerpt I left below I assume Mathematica doesn't like f(u,v)
because it thinks both u, v are both differenciable at once: which
isn't allowed (in Mathematica v4).

Maybe you can find a way to re-express your list of eq'n so Mathematica knows
what you know. or bundle it.

Seems like a "divide and conquer" strategy should work with DiracDelta
it just alternates right?

Anyhow it seems you have a x[t,z] term outside of DiracDelta which is
documented to work with diffeq so shouldn't be the problem.

I'm haven't bench checked and found a sol'n for you (sorry). so I
dont' know. But from your definition it seems you may be able to use
DiracDelta to not NOT use f(u,v)

I think the below book excerpt applies:

--------------------------------------------------------------

NDSolve uses a method for solving PDE's that is called the ~

For the method to work, an initial function must be specified for one
variable and boundary values may be specified for the other variable.
The initial function is used to find the initial conditions for the
system of the ODE's. Boundary and initial values may be specified on
at most three sides of a rectangle.
~

debguy

unread,
Apr 2, 2013, 3:25:08 AM4/2/13
to
I think I even confused myself with my reply.

Let me just say: check usage of ",x[t,z]," where and how used as
differently from the book's examples.

There's an example in the book allot like what you posted.

0 new messages