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.
|
|
0
|
|
|
|
Reply
|
Regina
|
11/11/2010 11:09:46 AM |
|
Hello,
as stated, your problem has really only the trivial solution. But if you
replace the second boundary condition by y(Pi/2)=0, you get a whole
family of solutions y=A Cos[t].
In order to pick one of these, you could replace the second boundary
condition by a proper initial condition, say y[0]=A. The second boundary
condition would still be satisfied.
If you are thinking about nonlinear problems, the period of the solution
could vary. To state the problem as a standard BVP, you have to rescale
your x variable, e.g. by setting
x = T*tau,
where T satisfies the trivial ODE T'=0. tau is the rescaled time.
So you could also specify your problem as
y''[tau]+T[tau]^2 y[tau] ==0,
T'[tau]==0,
y[0]==A,
y'[0]==0,
y[1]==0
with the initial guess T[0]=Pi/2.
With this method you could also solve more difficult problems, like
e.g. the pendulum equation:
y''[tau]+T[tau]^2 Sin[y[tau]] == 0.
Good luck
Alois
|
|
0
|
|
|
|
Reply
|
Alois
|
11/12/2010 10:25:46 AM
|
|
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.
>
|
|
0
|
|
|
|
Reply
|
Kevin
|
11/13/2010 5:59:41 AM
|
|
|
2 Replies
650 Views
(page loaded in 0.033 seconds)
Similiar Articles: shooting method, boundary value problem - comp.soft-sys.math ...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... Solving Second Order Nonlinear BVP - comp.soft-sys.matlab ...Solving Second Order Nonlinear BVP - comp.soft-sys.matlab ... Nonlinear Dynamics A shooting method is developed for solving nonlinear boundary value problems with ... Euler's Method Matlab Code: initial value problem - comp.soft-sys ...shooting method, boundary value problem - comp.soft-sys.math ... Euler's Method Matlab Code: initial value problem - comp.soft-sys ..... Matlab Code: initial value problem ... Boundary conditions definition for heat equation PDE Toolbox ...shooting method, boundary value problem - comp.soft-sys.math ... Boundary conditions definition for heat equation PDE Toolbox ... Hi, I'm struggling with heat transfer ... Solving a system of elliptic PDEs with varying boundary condition ...shooting method, boundary value problem - comp.soft-sys.math ... Solving a system of elliptic PDEs with varying boundary condition ... Methods for solving PDEs - comp.sys ... Poisson equation with boundary conditions on rectangle - comp.soft ...shooting method, boundary value problem - comp.soft-sys.math ... Poisson equation with boundary conditions on rectangle - comp.soft ... Euler's Method Matlab Code: initial ... NDSolve for catenary - comp.soft-sys.math.mathematicaYour problem is likely in the attempt to solve a boundary value problem rather than an initial value problem. Here is a quick shooting method that gets the answer ... problem with neumann boundary conditions for heat equation - comp ...Crank-Nicolson method - comp.soft-sys.matlab problem with neumann boundary conditions for heat equation ... conditions definition for heat equation ... boundary value problem ... Programmatic solving of nonlinear elliptic PDE? - comp.soft-sys ...shooting method, boundary value problem - comp.soft-sys.math ... If you are thinking about nonlinear problems, the period of the solution ... Methods for solving PDEs ... Problem: non linear 2nd order differential equation - comp.soft ...shooting method, boundary value problem - comp.soft-sys.math ... Problem: non linear 2nd order differential equation - comp.soft ... Please help me out as to which method ... Shooting Method for Boundary Value Problems - Cal State Fullerton WebModule. for. The Shooting Method for Boundary Value Problems . Background for Boundary Value Problems Another type of differential equation has the form 5 .3 B o u n d a ry v a lu e p ro b lem s: th e sh o o tin g m eth o dA M A T H 301 (!c J. N . K u tz) 60 5 .3 B o u n d a ry v a lu e p ro b lem s: th e sh o o tin g m eth o d T o th is p oin t, w e h ave on ly con sid ered th e solu ... 7/22/2012 12:28:06 PM
|