# How to graph two locus graphs in a graph as a curve?

jospercomp shared this question 1 year ago

How to graph two locus graphs in a graph to create 2D phase plane plot.

f'(t, f, g, h) = gg'(t, f, g, h) = h

h'(t, f, g, h) = -t h + 3t g + 2f + t

NSolveODE({f', g', h'}, 0, {1,2,-2}, 10)

try

Polyline(Zip((y(P), y(Q)), P, First(numericalIntegral1, Length(numericalIntegral1)), Q, First(numericalIntegral2, Length(numericalIntegral2))))

for numericalIntegral1 vs numericalIntegral2

the rest like exercise for you

1

1

ODE example to create 2D phase plane plot.

1

ODE example to create 2D phase plane plot.

1

and say you want: f vs g? g vs h? (f,h)?

1

numericalIntegral1 vs numericalIntegral2

numericalIntegral2 vs numericalIntegral1

numericalIntegral1 vs numericalIntegral3

numericalIntegral3 vs numericalIntegral1

numericalIntegral2 vs numericalIntegral3

numericalIntegral3 vs numericalIntegral2

1

I remember seeing a really nice phase plane app here. https://www.geogebra.org/m/utcMvuUy

It uses locus plots, you may be able to find your answer there. Good luck.

2

try

Polyline(Zip((y(P), y(Q)), P, First(numericalIntegral1, Length(numericalIntegral1)), Q, First(numericalIntegral2, Length(numericalIntegral2))))

for numericalIntegral1 vs numericalIntegral2

the rest like exercise for you

1

Fabulous and amazing this nested super command.

1

I think you do not need so many points in numericalIntegral

1

Correct. It is true.

2

this was the usual method for getting values from a locus or sequence but after more attemps I think that for numericalIntegral1 = NSolveODE({f', g', h'}, 0 ,{1, 2, -2}, 3) is better to use f(x) = Function(Join({{0, 3}, Zip(y(P), P, First(numericalIntegral1, Length(numericalIntegral1)))}))

so you can get values using expressions like f(1.5) etc, and create curve(f(t),g(t),t,0,3)

WARNING: not all comands for function work with freehand functions because only numerical methods can be used; ie: derivative(<freehand(x)>)=undefined