I have an equation,
ele[E2_] = -(1/(2 K3))
L (E2^2 ea eo Sin[2 g[z]] - (K1 - K3) Sin[2 g[z]] Derivative[1][
g][z]^2 + (K1 + K3 + (K1 - K3) Cos[2 g[z]]) (
g^\[Prime]\[Prime])[z])
(* and parameters;*)
K1 = 12 ;
K3 = 19.5;
eo = 8.85;
ea = 14.5;
L = 1;
(for E2= 2 the starting value is 6)
nd = Map[First[
NDSolve[{ele[2] == 0, g[0] == 0, g[L] == 0}, g[z], {z, 0, L},
Method ->
"BoundaryValues" -> {"Shooting",
"StartingInitialConditions" -> { g[0] == 0, g'[0] == #}}]] &,
{6}];
sl = Plot[Evaluate[{g[z]*(180/\[Pi]) /. nd}], {z, 0, L},
PlotRange -> All]
(for E2= 3 the starting value is 9.6)
nd = Map[First[
NDSolve[{ele[3] == 0, g[0] == 0, g[L] == 0}, g[z], {z, 0, L},
Method ->
"BoundaryValues" -> {"Shooting",
"StartingInitialConditions" -> { g[0] == 0, g'[0] == #}}]] &,
{9.6}];
sl = Plot[Evaluate[{g[z]*(180/\[Pi]) /. nd}], {z, 0, L},
PlotRange -> All]
For (E2=1, the starting value is 1)
I cannot execute findroot to obtain starting values, so I can get the same output for E2 going from 1 to 30. By changing E2 from 1 to 30, the g will increase for instance E2=1,2,3,4 and stabilizes at 90 for E2=5,6,7.....
The output looks like the following for E2=3 and starting value 9.6.
When I copy the code back from stack to mathematical, it is giving some errors, so that's why the image with the infull code is attached.