# Error messages from NDSOlve

I am trying to solve a boundary value problem with NDSolve. The code is:

sol = Block[{M = 0.0},
NDSolve[{
f'''[x] + f[x]*f''[x] - f'[x]*f'[x] - M*f'[x] == 0,
f[0] == 0, f'[0] == 1, f'[15] == 0},
f, x,
MaxSteps -> 10^5,
AccuracyGoal -> 50,
PrecisionGoal -> 50,
WorkingPrecision -> 50,
Method ->
{"Shooting", "StartingInitialConditions" -> {f[0] == 0, f'[0] == 1, f''[0] == -0.5}}]]


The f''[0] == -0.5 that you see in the Method option is just trial and error on my part. When I execute the code, I get the following error messages.

NDSolve::precw: The precision of the differential equation ({0. (f^[Prime])[x]-(f^[Prime])[x]^2+f[x] (f^[Prime][Prime])[x]+(f^(3))[x]==0,f[0]==0,(f^[Prime])[0]==1,(f^[Prime])[10]==0}) is less than WorkingPrecision (50.). >>

NDSolveReinitialize::precw: The precision of the argument function ({f[0]==0,(f^\[Prime])[0]==1,(f^\[Prime]\[Prime])[0]==-0.5}) is less than WorkingPrecision (50.). >>

NDSolve::ndtol: Tolerances requested by the AccuracyGoal and PrecisionGoal options could not be achieved at x == 0. >>

NDSolve::ndtol: Tolerances requested by the AccuracyGoal and PrecisionGoal options could not be achieved at x == 0. >>

NDSolve::ndtol: Tolerances requested by the AccuracyGoal and PrecisionGoal options could not be achieved at x == 0. >>

General::stop: Further output of NDSolve::ndtol will be suppressed during this calculation. >>

NDSolve::berr: There are significant errors {4.3180842775472223126931759314001997855580001822181*10^-78,-0.50000000000000000000000000000000000000000000000000,0.50000000000000000000000000000000000000000000000000} in the boundary value residuals. Returning the best solution found.>>

-
You're mixing precision quite badly here, which leads to these error messages. How much precision do you really need in the result? Just remove MaxSteps -> 10^5, AccuracyGoal -> 50, PrecisionGoal -> 50, WorkingPrecision -> 50 and you'll get an answer straight away without any problems. If you really need high precision, note that WorkingPrecision has to be higher than AccuracyGoal/PrecisionGoal, and you should avoid introducing values (such as 0.0 and -0.5) with less than your working precision. – Oleksandr R. Jan 4 '14 at 22:54

sol = Block[{M = 0.0},
`