0
$\begingroup$

I am trying to solve

enter image description here

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])]
$\endgroup$
6
  • 2
    $\begingroup$ Please add copy-pastable code, not images of code. Also, what is the exact problem you're facing? $\endgroup$
    – corey979
    Commented Mar 23, 2019 at 12:57
  • $\begingroup$ paste you code please $\endgroup$
    – Alrubaie
    Commented Mar 23, 2019 at 13:08
  • $\begingroup$ 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 $\endgroup$
    – user63593
    Commented Mar 23, 2019 at 13:41
  • $\begingroup$ [theta][0] = 1 is a syntax error, do you mean theta[0] == 1? $\endgroup$
    – Coolwater
    Commented Mar 23, 2019 at 18:02
  • $\begingroup$ Very similar to 100659. $\endgroup$
    – bbgodfrey
    Commented Mar 24, 2019 at 4:30

1 Answer 1

7
$\begingroup$

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]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.