6 added 90 characters in body
source | link

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];
 

note the range and increment on t here are important tuning parameters to play with.

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[sol - target], {u, .21 } , {t, 1}]

{3.23748*10^-9, {u -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];
 
 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[sol - target], {u, .21 } , {t, 1}]

{3.23748*10^-9, {u -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];

note the range and increment on t here are important tuning parameters to play with.

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[sol - target], {u, .21 } , {t, 1}]

{3.23748*10^-9, {u -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

5 deleted 15 characters in body
source | link

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[(sol /. u -> u0)FindMinimum[Norm[sol - target ]target], {u0u, .21 } , {t, 1}]

{3.23748*10^-9, {u0u -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[(sol /. u -> u0) - target ], {u0, .21 } , {t, 1}]

{3.23748*10^-9, {u0 -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[sol - target], {u, .21 } , {t, 1}]

{3.23748*10^-9, {u -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

4 added 259 characters in body
source | link

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[(sol /. u -> u0) - target ], {u0, .21 } , {t, 1}]

{3.23748*10^-9, {u0 -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .217230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .217, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

Here is a stab at what I think you are asking:

 ti = 0;
 yi = 0;
 zi = -.75;
 zf = -.5;
 eps = .01;
 sol = {y[t], z[t]} /. First@FullSimplify[DSolve[{
   y'[t] == 1/(2 zf) y[t] - u z[t],
   z'[t] == -1 + 1/zf z[t] + u y[t],
   y[ti] == yi, z[ti] == zi},
        {y[t], z[t]}, t]];
 target = {Sqrt[-2*(zf)*eps + eps^2], zf};

brute force discretize the solution and find the minimum distance to the target point (for such a highly nonlinear function this is much faster than NMinimise, and guarantees finding a global min, within the discretization approximation of course )

 dis[u0_] := 
     Min@Table[Norm[ (sol /. u -> u0) - target ] , {t, 0, 10, .05}];

 Plot[dis[u], {u, -1, 1}]

enter image description here

you come very close to your target point around 0.21.

Armed with a good guess now we can use FindMinimum:

 FindMinimum[Norm[(sol /. u -> u0) - target ], {u0, .21 } , {t, 1}]

{3.23748*10^-9, {u0 -> 0.230625, t -> 1.62219}}

 ParametricPlot[
    Table[Chop[sol /. u -> u0 ], {u0, {.1, .230625, .3, 1, 5}}] , {t, 0, 10},
        Epilog -> Point[target], PlotRange -> All, AspectRatio -> 1]

enter image description here

    Post Undeleted by george2079
3 added 259 characters in body
source | link
    Post Deleted by george2079
2 added 6 characters in body
source | link
1
source | link