Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6959

Options for DSolve

From Martin <mgrahl@gmx.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Options for DSolve
Date 2011-12-06 08:14 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jbkitk$i1r$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Options for DSolve Martin <mgrahl@gmx.net> - 2011-12-06 08:14 +0000

csiph-web