All pastes #840331 Raw Edit

Unnamed

public text v1 · immutable
#840331 ·published 2007-12-31 18:51 UTC
rendered paste body
Definition of constants
> restart;

with(plots);
> d[0] := 1; theta := (1/6)*Pi;
                                      1
                                    1
                                    - Pi
                                    6   
Function definitions
Exponential helper function
First, we define a helper function that expresses the amplitude of the cosine and sine functions as a function of time.
> K[1] := d[0]; K[2] := arctan(theta);
                                      1
                                      /1   \
                                arctan|- Pi|
                                      \6   /
> A := proc (t) options operator, arrow; K[1]*exp(-K[2]*t) end proc;
t -> K[1] exp(-K[2] t)
Coordinate functions in function of time
> x := proc (t) options operator, arrow; A(t)*cos(t) end proc; y := proc (t) options operator, arrow; A(t)*sin(t) end proc;
t -> A(t) cos(t) 
t -> A(t) sin(t) 
Plots
Helper amplitude function
> plot(A(t), t = 0 .. 10); 

Coordinate functions in function of time
> P[x] := plot(x(t), t = 0 .. 10, color = red); P[y] := plot(y(t), t = 0 .. 10, color = blue); display({P[x], P[y]});

Trace
> P[t] := implicitplot([x(t), y(t), t], x = 0 .. 1, y = 0 .. 1);
Error, (in plots/implicitplot) invalid input: resultant form requires that the inputs be polynomials/equations in the elimination variable
>