MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Options for DSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123406] Options for DSolve
  • From: Martin <mgrahl at gmx.net>
  • Date: Tue, 6 Dec 2011 03:12:01 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hello,

I have a question concerning the options for Mathematica's DSolve. I
want to find the InterpolatingFunction for a function depending on two
independent variables U[k,phi] in the range {k,1,500} and {phi,
1600,2500}. I try to solve a single differential equation for U[k,phi]
involving the first derivative with respect to k, and the first and
the second derivative with respect to phi.
I use DSolve in the following form:
  NDSolve[{ differential equation , initial condition }, U , {k,
1,500} , {phi,1600,2500} , Options]
My initial condition is U[500,phi]= 2.5 phi^2 .

The method worked for simpler differential equations involving also
two independent variables. The actual one however is a bit more
complicated, involving for example Coth and Tanh. Although Mathematica
finds a solution, it cannot be correct, since adding options like
PrecisionGoal change the result dramatically. So I tried to improve
the result using such options, but I don't know what is the right
strategy. I considered
PrecisionGoal ,
AccuracyGoal ,
MaxStepSize.

Using PrecisionGoal and AccuracyGoal simultaneously, at PrecisionGoal-
>18, AccuracyGoal->10 I obtain the following warnings:

NDSolve::mxsst: Using maximum number of grid points 10000 allowed by
the MaxPoints or MinStepSize options for independent variable \
[CurlyPhi].
NDSolve::ndtol: Tolerances requested by the AccuracyGoal and
PrecisionGoal options could not be achieved at k == 500.`.

So I decided to decrease the StepSize (which means increasing the
number of grid points, right?) by
MaxStepSize->0.01 which results in the warnings:

NDSolve::eerri: Warning: Estimated initial error on the specified
spatial grid in the direction of independent variable \[CurlyPhi]
exceeds prescribed error tolerance
NDSolve::ndtol: Tolerances requested by the AccuracyGoal and
PrecisionGoal options could not be achieved at k == 500.`

Could someone please explain to me what is a meaningful strategy in
such a case?
A further question: does MaxStepSize change the number of grid points
used in the computation? How can I tell Mathematica how much
GridPoints I want to use?

Here's the concrete example (copy- and paste-able into notebook):


T = 45
mu = 254
g = 3.2

sol = NDSolve[{k*D[U[k, \[CurlyPhi]], k] ==
    k^5/(12*\[Pi]^2)*(3/Sqrt[
        k^2 + 2*D[U[k, \[CurlyPhi]], \[CurlyPhi]]]*
        Coth[Sqrt[k^2 + 2*D[U[k, \[CurlyPhi]], \[CurlyPhi]]]/(2*T)] +
       1/Sqrt[k^2 + 2*D[U[k, \[CurlyPhi]], \[CurlyPhi]] +
         4*\[CurlyPhi]*D[U[k, \[CurlyPhi]], {\[CurlyPhi], 2}]]*
        Coth[Sqrt[
         k^2 + 2*D[U[k, \[CurlyPhi]], \[CurlyPhi]] +
          4*\[CurlyPhi]*D[U[k, \[CurlyPhi]], {\[CurlyPhi], 2}]]/(
         2*T)] - (2*3*2)/Sqrt[
        k^2 + g^2*\[CurlyPhi]]*(Tanh[(
           Sqrt[k^2 + g^2*\[CurlyPhi]] - mu)/(2*T)] +
          Tanh[(Sqrt[k^2 + g^2*\[CurlyPhi]] + mu)/(2*T)])),
   U[500, \[CurlyPhi]] == 10/4*\[CurlyPhi]^2},
  U, {k, 1, 500}, {\[CurlyPhi], 1600, 2500}, PrecisionGoal -> 18,
  AccuracyGoal -> 10]


Thank you,
Martin



  • Prev by Date: Re: How to get elements satisfying specific condition from a list
  • Next by Date: Re: reducing the size of a Manipulate slider control, problem when using ImageSize
  • Previous by thread: Lines for exclusions too noticeable
  • Next by thread: Re: Options for DSolve