| Author |
Comment/Response |
Michael
|
07/10/12 2:30pm
In Response To 'Re: Maximizing solutions of NDSolve' --------- Great. "DifferentialEvolution" etc each have further options. See the Documentation.
> I tried your first suggestion as well but for some reason that
> didn't calculate the function mueff very accurately so I think I'll
> stick with interpolation.
Sorry about that. The accuracy can be controlled with options, for example by
s[(q0_)?NumericQ] :=
s[q0] = (*First@*)
NDSolve[{Derivative[2, 0][y][
x, $\[Kappa]02] + (4 q[q0,
x]) ($\[Kappa]02/(2 Sqrt[a[x] q[q0, x]]) + Sin[x]^2) y[
x, $\[Kappa]02] == 0,
Derivative[1, 0][y][0, $\[Kappa]02] == 0,
y[0, $\[Kappa]02] ==(*0.5*)1/2},
y, {x, 0, 200}, {$\[Kappa]02, 0, 3/2}, MaxSteps -> 500000,
Method -> {Automatic}, MaxStepFraction -> 1/100, AccuracyGoal -> 8, PrecisionGoal -> 8]
I don't know the exact values mueff, so I can't compare the results of the function above and the one you posted.
URL: http://reference.wolfram.com/mathematica/tutorial/ConstrainedOptimizationGlobalNumerical.html, |
|