Robert M. Corless
Department of Applied Mathematics
University of Western Ontario
London, Canada

Copyright 2001 by Robert M. Corless
All rights reserved

Programming in Maple 

Программирование в Maple

Sample Maple programs 

Пример программ Maple

Parametric solution of algebraic equations 

Параметрическое решение алгебраических уравнений

> restart;
> read "D:/books/ess/programs/parsolve.mpl";
> eq1 := u^2 + v^2 = a^2;

eq1 := u^2+v^2 = a^2

> sol1 := parsolve( eq1 , [u,v], t);

sol1 := {v = t/(1+t^2)^(1/2)*a, u = 1/(1+t^2)^(1/2)...

> seq( normal( subs( sol, eq1 )), sol=sol1 );

a^2 = a^2, a^2 = a^2

> sol2 := parsolve( eq1, [u=-a,v=0], s );

sol2 := {v = 2*s*a/(s^2+1), u = -a*(s^2-1)/(s^2+1)}...

> seq( normal( eval( eq1, sol )), sol=sol2 );

> eq3 := s^2 + s*t + t^2 = a^2;

eq3 := s^2+s*t+t^2 = a^2

> parsolve( eq3, [s=0,t=a], u);

{s = -a*(1+2*u)/(1+u+u^2), t = -a*(-1+u^2)/(1+u+u^2...

> Folium := parsolve( x^3 - 3*a*x*y + y^3 = 0, [x,y], t);

Folium := {x = 3*t*a/(1+t^3), y = 3*t^2*a/(1+t^3)}

> plot( eval([x/a, y/a, t=-5..5], Folium ), view=[-2..2,-2..2], colour=black, scaling=CONSTRAINED );

> Foley := parsolve( x^5 - 5*x*y^3 + y^5, [x,y], u);

Foley := {x = 5*u^3/(1+u^5), y = 5*u^4/(1+u^5)}

> plot( eval([x,y,u=-8..8],Foley), numpoints=101, view=[-4..4,-4..4], colour=black, scaling=CONSTRAINED );

> _EnvExplicit := false;

_EnvExplicit := false

> f := randpoly([x,y], degree=5, sparse);

f := 54-5*y+99*x^3-61*x^2*y-50*x^3*y-12*x^5

> simpler := parsolve( f, [x,y], s );

С официального разрешения                    © 2002 Waterloo Maple, Inc

 
Hosted by uCoz