Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: shooting method, boundary value problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113798] Re: shooting method, boundary value problem
  • From: "Kevin J. McCann" <Kevin.McCann at umbc.edu>
  • Date: Sat, 13 Nov 2010 00:59:38 -0500 (EST)
  • References: <ibgitq$e87$1@smc.vnet.net>

This looks like normal modes for sound propagation in a waveguide. At 
any rate, you have a 2nd order differential equation with two 
conditions. This leads to a unique solution. If you are looking for 
normal modes, you probably need to think about solving the more general case
y''[x]+alpha*y[x]==0

For different values of alpha. Here is my attempt.

Manipulate[
  Y = y /. NDSolve[{y''[x] + \[Alpha] y[x] == 0, y[1] == 0,
       y'[1] == a}, y, {x, 0, 1}][[1]];
  Plot[Y[x], {x, 0, 1}, PlotRange -> {-10, 10}]
  ,
  {a, -20, 20}, {\[Alpha], 0, 500, .1}
  ]

used initial conditions at the far end and then manipulate a and alpha. 
You could do this automatically with a zero finder approach.

Kevin


On 11/11/2010 6:09 AM, Regina wrote:
> hi there,
> im trying to solve a more involved differential equation that has a
> whole family of solutions. so i started with a similar and more simple
> example:
>
> Manipulate[
>   Plot[Evaluate[{y[x]} /.
>      NDSolve[{y''[x] + y[x] == 0, y'[0] == 0, y[1] == 0}, y, x,
>       Method ->  {"Shooting",
>         "StartingInitialConditions" ->  {y[0] == b, y'[0] == a}}]], {x,
>     0, 1}, PlotRange ->  All], {a, 0, 3}, {b, 0, 3}]
>
> what i basically want is to get all the sinusoidal modes by varying
> 'some' parameter. i want to be able to tune one parameter so that i
> get the mode with zero nods, one nod, two nods etc. how do i do that?
>
> (i know that mathematica can solve this equation analytically, but as
> mentioned above, this is just an example for a more involved
> calculation.)
>
> thanks for your help.
> r.
>


  • Prev by Date: Re: Constructing matrix out of submatrices
  • Next by Date: Re: 2-D Butterworth lowpass filter?
  • Previous by thread: Re: shooting method, boundary value problem
  • Next by thread: occasional problems with exporting to GIF, Unable to communicate