Re: Parametric equations
- To: mathgroup at smc.vnet.net
- Subject: [mg15008] Re: [mg14980] Parametric equations
- From: Daniel Lichtblau <danl>
- Date: Sat, 5 Dec 1998 01:30:12 -0500
- References: <199812020859.DAA23399@smc.vnet.net.>
- Sender: owner-wri-mathgroup at wolfram.com
MAvalosJr at aol.com wrote:
>
> Hi Everyone:
>
> Any suggestions on how to plug into mathematica to derive parametric
> equations from a quadratic?
> My example is: y= - x^2/ 72 + x.
> Using pencil and paper I get: x= 24 Sqrt[2 t] and y= -16 t^2 + 24 Sqrt[2
> t].
> Thanks again for whatever
>
> Manuel
This example is perhaps simpler than you might think. Since you have y
explicitly as a function of x, just parametrize by x. Explicitly: x=t,
y=-t^2/72 + t.
Below is some code that will parametrize conics in general. It is based
on a standard idea, described as follows. Choose a random x coordinate,
find one (of two candidate) y values that lies on the curve over that x
coordinate, intersect the line through that point with the conic to get
another point on the curve. Because we have a conic this second point
will be unique; I parametrize it by the slope of that intersecting
line.
The reason I use a random x value is to avoid problems with curves such
as x*y-1 that do not lie over x==0.
parametrize[conic_, {x_,y_,t_}] := Module[
{x1=Random[Integer,{5,15}], y1, sol},
y1 = y /. First[Solve[(conic /. x->x1) == 0, y]];
sol = First[Select[
Solve[{conic==0, y-y1 == t*(x-x1)}, {x,y}], !FreeQ[#,t]&]]
]
Here are some examples. Note that this method is less than ideal in that
it may need complex coefficients. The only way to avoid this would be
to find real {x1,y1} on the curve. This of course will not happen in
general when we use a random x value and solving for y.
In[62]:= InputForm[parametrize[4 - x + x^2 - 2*y^2, {x,y,t}]]
Out[62]//InputForm=
{y -> -Sqrt[107] - 15*t + (14*t)/(-1 + 2*t^2) +
(4*Sqrt[107]*t^2)/(-1 + 2*t^2) + (30*t^3)/(-1 + 2*t^2),
x -> (2*(7 + 2*Sqrt[107]*t + 15*t^2))/(-1 + 2*t^2)}
In[63]:= InputForm[parametrize[4 - x + x^2 + 2*y^2, {x,y,t}]]
Out[63]//InputForm=
{y -> -2*I*Sqrt[3] - 5*t - (4*t)/(1 + 2*t^2) +
(8*I*Sqrt[3]*t^2)/(1 + 2*t^2) + (10*t^3)/(1 + 2*t^2),
x -> (2*(-2 + 4*I*Sqrt[3]*t + 5*t^2))/(1 + 2*t^2)}
In[64]:= InputForm[parametrize[4 - x + x^2 + 2*y^2 - 3*x*y, {x,y,t}]]
Out[64]//InputForm=
{y -> (15 - Sqrt[37] - 20*t - (54*t)/(-2 + 6*t - 4*t^2) +
(6*Sqrt[37]*t)/(-2 + 6*t - 4*t^2) + (120*t^2)/(-2 + 6*t - 4*t^2) -
(8*Sqrt[37]*t^2)/(-2 + 6*t - 4*t^2) - (80*t^3)/(-2 + 6*t -
4*t^2))/2,
x -> (-27 + 3*Sqrt[37] + 60*t - 4*Sqrt[37]*t - 40*t^2)/(-2 + 6*t -
4*t^2)}
In[65]:= InputForm[parametrize[a*x^2 + b*x*y + c*y^2 + d*x + e*y + f,
{x,y,t}]]
Out[65]//InputForm=
{y -> ((-8*b)/c - e/c - Sqrt[(8*b + e)^2 - 4*c*(64*a + 8*d + f)]/c -
16*t +
(16*b^2*t)/(2*a*c + 2*b*c*t + 2*c^2*t^2) -
(32*a*c*t)/(2*a*c + 2*b*c*t + 2*c^2*t^2) -
(4*c*d*t)/(2*a*c + 2*b*c*t + 2*c^2*t^2) +
(2*b*e*t)/(2*a*c + 2*b*c*t + 2*c^2*t^2) +
(2*b*Sqrt[(8*b + e)^2 - 4*c*(64*a + 8*d + f)]*t)/
(2*a*c + 2*b*c*t + 2*c^2*t^2) + (32*b*c*t^2)/(2*a*c + 2*b*c*t +
2*c^2*t^2) + (4*c*Sqrt[(8*b + e)^2 - 4*c*(64*a + 8*d + f)]*t^2)/
(2*a*c + 2*b*c*t + 2*c^2*t^2) + (32*c^2*t^3)/(2*a*c + 2*b*c*t +
2*c^2*t^2))/2, x -> (8*b^2 - 16*a*c - 2*c*d + b*e +
b*Sqrt[(8*b + e)^2 - 4*c*(64*a + 8*d + f)] + 16*b*c*t +
2*c*Sqrt[(8*b + e)^2 - 4*c*(64*a + 8*d + f)]*t + 16*c^2*t^2)/
(2*a*c + 2*b*c*t + 2*c^2*t^2)}
Daniel Lichtblau
Wolfram Research
- References:
- Parametric equations
- From: MAvalosJr@aol.com
- Parametric equations