MathGroup Archive 2003

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

Search the Archive

Re: differential equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43696] Re: [mg43680] differential equation
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Tue, 30 Sep 2003 16:42:49 -0400 (EDT)
  • References: <200309290547.BAA08530@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Andrew Lindsay wrote:
> 
> Dear MathGroup,
> 
> I would also like to ask a question at this time also.  I am trying to solve
> the following differential equation, but am not sure how to go about it.
> 
> E''(z) + E'(z)*H*(1/ra - 1/z) + E(z)*(2*H/z^2 - B) = 2*H/z^3 * Integral z to
> L, E(t) dt.
> 
> Where H, B and ra are all constants.
> 
> I can supply the actual derivation of the equation in pdf form to anyone
> that is interested.
> 
> The equation is used to solve attenuation along a pipeline.
> 
> Best regards
> 
> Andrew

Here is a possible direction.

(i) Write out the differential-integral entity in actual Mathematica
syntax. Among other things, this means you should not name your function
'E'.
(ii) Differentiate it.
(iii) Eliminate the integral.
(iv) Find a numeric solution using numeric values for the parameters.
Presumably you have in mind initial conditions for function and first
derivative. Or maybe boundary values. Make up an initial value for
second derivative in order to obtain this solution.
(v) Use a shooting method to find the "correct" initial value that gives
a solution satisfying the original differential-integral equation.

I'll show how one might start this.

ideq = ee''[z] + ee'[z]*hh*(1/ra - 1/z) + ee[z]*(2*hh/z^2 - bb) -
  2*hh/z^3 * Integrate[ee[t], {t,z,ll}]

difideq = D[ideq,z]

deq = First[Eliminate[{ideq,difideq}==0, Integrate[ee[t], {t,z,ll}]]]

Here I'm just making up values for your constants; I have no idea what
values you might actually wish to use. Note that I am giving an initial
value for the first derivative. If you have instead boundary values, you
will want to use a shooting method (or otherwise) at this stage as well
in order to find the corresponding initial first derivative.

nsol = NDSolve[{deq/.{ra->1,hh->2,bb->3},
  ee[1]==1,ee'[1]==2,ee''[1]==.5}, ee[z], {z,1,2}]

conditions. Now you vary the second derivative initial value and use
root-finding to find the correct initial value that solves ideq (for a
specified numeric value for the parameter ll).

My recollection is that the MathGroup archives will have several
examples with implemention of the shooting method. If other responses do
not fill in this detail, a search should find them.


Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: replicating variables
  • Next by Date: Bug 2?
  • Previous by thread: differential equation
  • Next by thread: Rotating a 2D graphic on screen?