Skip to main content
2 of 2
deleted 377 characters in body
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40
ClearAll["Global`*"]
 Λ = -30;
u[η_] := (2*η - 2*η^3 + η^4) + Λ/
     6*(η - 3*η^2 + 3*η^3 - η^4);
θ = Integrate[u[η]*(1 - u[η]), {η, 0, 1}] // N;
δ = 1/θ;
u[y_] := Piecewise[{{1, 
    y > δ}, {(2*y/δ - 
       2*(y/δ)^3 + (y/δ)^4) + Λ/
       6*((y/δ) - 3*(y/δ)^2 + 
        3*(y/δ)^3 - (y/δ)^4), True}}]
Assuming[yd ∈ Reals, 
 FindRoot[Integrate[u[y], {y, 0, yd}], {yd, 1}]]

{yd -> 6.20224*10^-9}

OR

Λ = -30;
u[η_] := (2*η - 2*η^3 + η^4) + Λ/
     6*(η - 3*η^2 + 3*η^3 - η^4);
θ = Integrate[u[η]*(1 - u[η]), {η, 0, 1}] // N;
δ = 1/θ;
u[y_] := Piecewise[{{1, 
    y > δ}, {(2*y/δ - 
       2*(y/δ)^3 + (y/δ)^4) + Λ/
       6*((y/δ) - 3*(y/δ)^2 + 
        3*(y/δ)^3 - (y/δ)^4), True}}]
Assuming[yd ∈ Reals, NSolve[Integrate[u[y], {y, 0, yd}], yd]]

{{yd -> 0}, {yd -> 9.01341}}

OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40