# Solving a BVP using NDSolve with conditions at infinity

I am trying to solve

My code is

s = NDSolve[{Derivative[3][f][eta] + f[eta] Derivative[2][f][eta] -
Derivative[1][f][eta]^2 + 1 == 0, Derivative[2][theta][eta]
+0.7 f[eta] Derivative[1][theta][eta] = 0, [theta][0] = 1, [theta][#] = 0,
f[0] == 0, f'[0] == -1.18, f'[#] == 0}, f, theta, {eta, 0, 6}] & /@ Range[10, 2, 5];
Plot[Evaluate[f'[eta] /. s], {eta, 0, 6}, PlotRange -> All,
PlotLegends -> (ToString[#] & /@ Range[1, 0, 6])]

• Please add copy-pastable code, not images of code. Also, what is the exact problem you're facing? Mar 23, 2019 at 12:57
• paste you code please Mar 23, 2019 at 13:08
• s = NDSolve[{Derivative[3][f][eta] + f[eta] Derivative[2][f][eta] -Derivative[1][f][eta]^2 + 1 == 0, Derivative[2][theta][eta] +0.7 f[eta] Derivative[1][theta][eta] = 0, [theta][0] = 1, [theta][#] = 0, f[0] == 0, f'[0] == -1.18, f'[#] == 0}, f, theta, {eta, 0, 6}] & /@ Range[10, 2, 5]; Plot[Evaluate[f'[eta] /. s], {eta, 0, 6}, PlotRange -> All, PlotLegends -> (ToString[#] & /@ Range[1, 0, 6])] It is not working when I used couple equations. Please some one help me . Thanks Mar 23, 2019 at 13:41
• [theta][0] = 1 is a syntax error, do you mean theta[0] == 1? Mar 23, 2019 at 18:02
• Very similar to 100659. Mar 24, 2019 at 4:30

This is how you can solve your system of ODE's,

Eqn1 = f'''[x] + f[x]*f''[x] - f'[x]*f'[x] + 1 == 0;

Eqn2 = theta''[x] + Pr*(f[x]*theta'[x]) == 0;

BC1 = f[0] == 0;

BC2 =  f'[0] == epsilon;

BC3 = f'[N1] == 1;

BC4 = theta[0] == 1;

BC5 = theta[N1] == 0;

params = {epsilon -> -1.18, Pr -> 0.7};

N1 = 10; (*N1 is used for infinity. You can test your luck with a HUGE number*)

sol = NDSolve[{Eqn1, Eqn2, BC1, BC2, BC3, BC4, BC5} /. params, {f, theta}, {x, 0, N1}]

Plot[Evaluate[{f'[x], theta[x]} /. (sol)], {x, 0, N1}, PlotRange -> All,
PlotStyle -> {Blue, Red}, Frame -> True, FrameStyle -> Directive[Black, Bold, 12],
PlotRange -> All]