| Author |
Comment/Response |
Ben
|
05/02/12 12:32pm
Dear all,
I have a system of three nonlinear ordinary differential equations. I know the boundary conditions and I am using an iterative approach for determining the initial conditions, which requires that I guess the initial conditions, solve the ODEs, then calculate the boundary conditions based on the solution to the ODEs. I iterate this process until I guess the correct initial conditions that yield my known boundary conditions. I am using NDSolve and the technique works well, but is tedious because of the large number of manual iterations needed.
My question: Is there a function in Mathematica that will allow me to minimize the difference between the output of NDSolve and my ODE boundary conditions? I am aware of NMinimize, but I don't think this function will accomplish what I'd like to do. Essentially, what I'm trying to do is:
NMinimize(MyCostFunction, MyODEInitialConditions)
where MyODEInitialConditions are the initial conditions for a system of ODEs and
MyCostFunction is something like:
begin cost function
NDSolve[{SystemOfODEs, MyODEInitialConditions}, {x,y,z}, ...]
valueToMinimize = boundaryCondition(x,y,z) - expectedBoundaryConditions
return valueToMinimize
end cost fucntion
I appreciate any help on this.
Sincerely,
Ben
URL: , |
|