Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: boundary value problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30273] Re: boundary value problem
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sat, 4 Aug 2001 20:02:02 -0400 (EDT)
  • References: <9kg1bb$ihd$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

 Richard,

Sometimes DSolve will work

DSolve[{f''[x] == -f[x],f[0]== a,f'[L]== b},f,x]

{{f -> Function[{x}, a*Cos[x] + b*Sec[L]*Sin[x] +
      a*Sin[x]*Tan[L]]}}

NDSolve may work in a totally numerical situation (and techniques like the
shooting method may be used)

NDSolve[{f''[x]== -f[x],f[0]==1,f'[2]==3},f,{x,-3,3}]

{{f -> InterpolatingFunction[]}}

A series solution can be tried ( I'll send you my package separately).

<< "haypacks`Calculus`SeriesDSolve`"

n=4;

SeriesDSolve[{f''[x] == -f[x],f[0]==a,f'[L]==b},f,{x,0,n}]

{{f -> Function[x, a - ((6*b + 6*a*L - a*L^3)*x)/
       (3*(-2 + L^2)) - (a*x^2)/2 -
      ((-6*b - 6*a*L + a*L^3)*x^3)/(18*(-2 + L^2)) +
      (a*x^4)/24]}}

ff = %[[1,1,2]] ;

ff[0]

a

ff'[L]//Simplify

b

Simplify[f''[x]+f[x]/.f->ff]

(x^3*(24*b + a*(24*L - 4*L^3 - 6*x + 3*L^2*x)))/
  (72*(-2 + L^2))

Usually, we will need n to be much bigger, and we may find problems with
singularities.

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Richard S Hsu" <rhsu at U.Arizona.EDU> wrote in message
news:9kg1bb$ihd$1 at smc.vnet.net...
> Hi,
>
> Where I could find a mathematica program to solve
> a boundary value problem :
>
> f''[ x ] ==  g[x],   f[0] = a,  f'[L] = b ,
>
> where g[x] is a known function, a,b and L are constants.
>
> Thanks.
>
>
>
>
>
>




  • Prev by Date: Re: Pattern matching "on the fly"
  • Next by Date: Re: non-linear boundary value problem
  • Previous by thread: boundary value problem
  • Next by thread: non-linear boundary value problem