# Can maple 10 do graph pattern matching or find a repeating cycle in an equation/graph tia sal2

Discussion in 'Maple' started by temp, May 29, 2006.

1. ### tempGuest

Greetings All.

I'm trying to find out where this graph starts to repeat its cycle. I
think it's called graph pattern matching but I could be wrong. I looked up
in the help and the only thing that was close was stringtools but I can't
use that because I'm using an equation/graph. Is there a command that will
do graph pattern matching in maple 10 so I can know where a graph repeats?

tia sal2

a1 := x -> sin(x)

a2 := x -> 2 sin(2 x)

a4 := x -> 4 sin(4 x)

a8 := x -> 8 sin(8 x)

a7 := x -> 7 sin(7 x)

a5 := x -> 5 sin(5 x)

plot([a1 + a2 + a4 + a8 + a7 + a5], 0 .. 16, color = [black])

temp, May 29, 2006

2. ### Robert IsraelGuest

It has nothing to do with graphs. You have a function and you want
to find its minimal period. Here's one possibility that might work
(it does in your example with sines):
solve(identity(F(x+T)=F(x), x));

2 Pi _Z1~

So the answer is 2 Pi.

Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada

Robert Israel, May 29, 2006

I have a question, regarding similar problem of plotting multiple plots
in same window (example: y(x) = C*x^2, C= {1..30} ) -> familiy of
parabolas

how to write a "for C 1 to 30 do" loop in implicitplot or plot
function?

TIA

try
plot({c*x^2$c=1..30},x=-1..1); Peter Pein, May 30, 2006 5. ### MladenGuest Peter Pein je napisao/la: /.../ Danke! Please do tell me what is this operator ("$") called. I would like to
see its definition and examples.

6. ### Thomas RichardGuest

It's the dollar operator, which forms a sequence of expressions.
To display its help page, enter ?$(or ?dollar, if you prefer). A common application is the entry of higher derivatives: diff(cos(3*x),x$5);
is more readable and saves some keystrokes as compared to
diff(cos(3*x),x,x,x,x,x);

Note that Maple 10 can also find many derivatives of symbolic
(unspecified) order: diff(cos(3*x),x\$n);

Thomas Richard, May 31, 2006
7. ### Walter RobersonGuest

Be careful with the dollar operator: it evaluates the left hand
side -once- and takes that result and evaluates it for each
value specified on the right. For example,
427419669081, 427419669081, 427419669081, 427419669081, 427419669081
321110693270, 343633073697, 474256143563, 558458718976, 746753830538
SQUARE(1), SQUARE(2), SQUARE(3), SQUARE(4), SQUARE(5)
1, 4, 9, 16, 25

Walter Roberson, May 31, 2006

Thanks for the tips!

But Maple resists to accept 'dollar' in implicitplot function.
(or I don't know the syntax? )
And unfortunately, 'dollar' doesn't have a 'step' - like 'for' loop
does.
Only half of a problem is solved, because the field is too dense for
bigger C

The truth is I need to plot orthogonal trajectories:
for example family of parabolas y= a*x^2 and family of ellipses x^2 +
2y^2 = c

is there maybe another way of solving the problem?

9. ### Peter PeinGuest

Do you want sth. like this:
clist:=[1/8,1/4,1/2,1,2,4]lot(map(c->c*x^2,clist),x=-3/2..3/2,y=0..2);
or that:
plot(map(c->[c*cos(t),c/sqrt(2)*sin(t),t=0..2*Pi],clist),scaling=constrained);
?

Peter Pein, Jun 1, 2006

Peter Pein je napisao/la:
Yes! That's it!
Thanks a lot!
But can this be plotted in a single window?
If not, I'll figure something out with photoshop...

11. ### Peter PeinGuest

Try it! ;-)

It displays all curves which belong to the parameter-list into a single plot.

Peter Pein, Jun 2, 2006