# Ellipsoid and hyperboloid with two sheets point A at Inf

Ellipsoid: x^2/a^2 + y^2/b^2 + z^2/c^2 = 1
Hyperboloid: x^2/a^2 + y^2/b^2 - z^2/c^2 = -1
Fixed point A[r*cos(u0)*sin(v0), r*sin(u0)*sin(v0), r*cos(v0)]
r -> inf

kill(all);

Generic point A

x0: r*cos(u0)*sin(v0);

y0: r*sin(u0)*sin(v0);

z0: r*cos(v0);

Generic point C

C: matrix(
 [xhat], 
 [yhat], 
 [zhat]
);

Line l determined by A and C

ec1: x - x0= lambda*(xhat - x0); 

ec2: y - y0 = lambda*(yhat - y0); 

ec3: z - z0 = lambda*(zhat - z0);

Auxiliary functions

ec2/ec1;

Making

k: rhs(%);

we get

y: y0 + k*(x - x0)$

ec3/ec1;

Making

m: rhs(%);

we get

z: z0 + m*(x - x0)$

## Ellipsoid

### Method: letting r --> inf after calculation of point D to get point Dinf

Quadratic polynomial p(x) = a2*x^2 + a1*x + a0

p: trigsimp(x^2/a^2 + y^2/b^2 + z^2/c^2 - 1)$

a2: ratcoeff(p,x,2)$

a1: ratcoeff(p,x,1)$

Appliyng Vieta's formula to get point D:

x1: trigsimp(-a1/a2 - xhat)$

y1: y0 + k*(x1-x0)$

z1: z0 + m*(x1-x0)$

Limit when r -> infty

x1inf: trigsimp(limit(x1,r,inf ))$

y1inf: trigsimp(limit(y1,r,inf))$

z1inf: trigsimp(limit(z1,r,inf))$

Dinf: matrix(
 [x1inf], 
 [y1inf], 
 [z1inf]
);

### Method: letting r --> inf before calculation of point Dinfp

Making

k0 : limit(rhs(ec2/ec1),r,inf);

We get

y: yhat + k0*(x - xhat)$

Making

m0: limit(rhs(ec3/ec1),r,inf);

We get

z: zhat + m0*(x - xhat)$

Quadratic polynomial p(x) = a2*x^2 + a1*x + a0

pp: trigsimp(x^2/a^2 + y^2/b^2 + z^2/c^2 - 1)$

a2p: ratcoeff(pp,x,2)$

a1p: ratcoeff(pp,x,1)$

Appliyng Vieta's formula to get point Dinfp:

x1infp: trigsimp(-a1p/a2p - xhat)$

y1infp: trigsimp(yhat + k0*(x1infp-xhat))$

z1infp: trigsimp(zhat + m0*(x1infp-xhat))$

Dinfp: matrix(
 [x1infp], 
 [y1infp], 
 [z1infp]
);

Direct calculation to verify that Dinf = Dinfp

trigsimp(Dinf - Dinfp);

## Hyperboloid with two sheets

### Method: letting r --> inf after calculation of point Dinf

Quadratic polynomial p(x) = a2*x^2 + a1*x + a0

p: trigsimp(x^2/a^2 + y^2/b^2 - z^2/c^2 + 1)$

a2: ratcoeff(p,x,2)$

a1: ratcoeff(p,x,1)$

Appliyng Vieta's formula to get point D:

x1: trigsimp(-a1/a2 - xhat)$

y1: y0 + k*(x1-x0)$

z1: z0 + m*(x1-x0)$

Limit when r -> infty

x1inf: trigsimp(limit(x1,r,inf ))$

y1inf: trigsimp(limit(y1,r,inf))$

z1inf: trigsimp(limit(z1,r,inf))$

Dinf: matrix(
 [x1inf], 
 [y1inf], 
 [z1inf]
);

### Method: letting r --> inf before calculation of point Dinfp

Making

k0 : limit(rhs(ec2/ec1),r,inf);

We get

y: yhat + k0*(x - xhat)$

Making

m0: limit(rhs(ec3/ec1),r,inf);

We get

z: zhat + m0*(x - xhat)$

Quadratic polynomial p(x) = a2*x^2 + a1*x + a0

pp: trigsimp(x^2/a^2 + y^2/b^2 - z^2/c^2 + 1)$

a2p: ratcoeff(pp,x,2)$

a1p: ratcoeff(pp,x,1)$

Appliyng Vieta's formula to get point Dinfp:

x1infp: trigsimp(-a1p/a2p - xhat)$

y1infp: trigsimp(yhat + k0*(x1infp-xhat))$

z1infp: trigsimp(zhat + m0*(x1infp-xhat))$

Dinfp: matrix(
 [x1infp], 
 [y1infp], 
 [z1infp]
);

Direct calculation to verify that Dinf = Dinfp

trigsimp(Dinf - Dinfp);