## 290 Reputation

10 years, 17 days

## Sorry...

Problem. write the equation of the line cut the two lines d1: x = 2*t, y= -t+1, z = t-2, d2: x = -1+2*m, y = 1+m, z = 3 and parallel to the plane 7*x+y-4*z=0.

This is my code.

> restart;with(geom3d):

with(LinearAlgebra):

a:=[2*t,-t+1,t-2]:

b:=[-1+2*m,1+m,3]:

line(d1,a,t):

line(d2,b,m):

plane(P,7*x+y-4*z=0,[x,y,z]):

a1:=convert(a,Vector):

a2:=convert(b,Vector):

v:=a1-a2:

n:=convert(NormalVector(P),Vector):

w:=CrossProduct(v,n):

sol:=solve([seq(w[i]=0,i=1..3)]);

coordinates(point(A,subs(sol[2],a))): #first way

coordinates(point(B,eval(b,sol[1]))): # second way

Equation(line(AB,[A,B],t));

## Another way...

This is my code. Please comment to me.

>restart;f:=(x,y,z)->a*x + b*y +c*z + d:

A:=f(2,-2,3):

B:=f(4,-5,6):

M:=f(1,2,3):

sol:=solve([A = 0, B=0, abs(M) = 2*sqrt(2), a^2 + b^2 + c^2 = 1],[a, b, c, d]):

for i to nops(sol) do subs(sol[i],f(x,y,z)=0) end do;

## Thank you...

Thank you very much.

## Thank you...

Thank you very much.

## Thank you...

Thank you very much.

## Thank you...

Thank you very much. I want the anserw has the form (x+1)^2 + (y+1)^2 +  (z-1)^2 = (2*2^(1/2))^`2` not the form (z-1)^2+(y+1)^2+(x+1)^2 = (2*2^(1/2))^`2`. What must i do?

## 2) How i can use the  commant ...

2) How i can use the  commant sort in the line Student[Precalculus][CompleteSquare](Equation(S));?

## Help me...

I think, when kitonum used the command, you must see the result of the command sort(Equation(Q)); In the command v:=map(x->x/2,v): if we changes x/2 by x/4, then we have another result, not good. My opinion Is there a general command for every cases? Thank you.

## Thank you...

Thanks to Kitonum. Based on the above code, wrote the following:

restart;with(geom3d):

point(A,1,-2,4), point(B,3,5,-1):

plane(P,x + y + z + 1 = 0, [x,y,z]):

n:=NormalVector(P);

line(AB,[A,B]):

a:=ParallelVector(AB);

with(linalg):

w:=crossprod(n,a):

v:=crossprod(w,a):

plane(Q,[A,v],[x,y,z]);

sort(Equation(Q));

My ansewr in -70*x-50*y-98*z+362 = 0. Is there any command I get an answer is -35*x-25*y-49*z+181 = 0 automatically? I ssed sort(1/2*Equation(Q)); but it is not good. Please help me. Thank you.

## second code...

> restart: with(geom3d):

point(A,1,2,3):

line(d1,[2*t + 2, -t -2, t + 3],t):

line(d2,[-m + 1, 2*m+1, m-1],m):

a:=ParallelVector(d1):

Equation(plane(P,[A,a],[x,y,z])): #P passing through A and perpendicular to d1

coordinates(intersection(B,d2,P)):

Equation(line(AB,[A,B],t));

Please comment to me. Thank you very much.

## Another way...

restart;with(geom3d): with(LinearAlgebra):

M:= <1,-1,3>:

line(Delta,[2*t+2,-t-1,t+1],t):

plane(P,x+y+z+3 = 0,[x,y,z]):

a:=convert(ParallelVector(Delta),Vector):

n:=convert(NormalVector(P),Vector):

A:=<x,y,z>:

v:=DotProduct(A-M, a,conjugate = false):

B:=<2,-1,1>: # B lies on Delta

d:=Norm(CrossProduct(A-B, a), 2)/Norm(a,2):

sol:=solve([x+y+z+3 = 0, v = 0, d = sqrt(33/2)]);

coordinates(point('A1',op([seq(rhs(sol[1,i]),i=1..3)])));

coordinates(point('A2',op([seq(rhs(sol[2,i]),i=1..3)])));

Please comment to me. Thank you very much.

## Thank you...

Thanh Markiyan Hirnyk very much. Thus, Maple has error.

## second code...

restart;a:= [2*t +1,t-2,-2*t+2]:

b:=[2-m,3+m,4+m]:

with(geom3d):

plane(P,x  - y+z-6=0,[x,y,z]):

line(d1,a,t):

line(d2,b,m):

S:=sum((a[j]-b[j])^2, j = 1 .. nops(a)):

n:=NormalVector(P):

w:=seq(a[j]-b[j], j = 1 .. nops(a)):

T:=sum(n[i]*w[i],i=1..3):

sol:=solve([S=54, T = 0],[t,m]):

point(A1, subs(op(1, sol[1]),a)):

point(B1, subs(op(2, sol[1]),b)):

Equation(line(A1B1,[A1,B1], k));

AreParallel(A1B1,P);

point(A2, subs(op(1,sol[2]),a)):

point(B2, subs(op(2,sol[2]),b)):

Equation(line(A2B2,[A2,B2], l));

AreParallel(A2B2,P);

Note that, the line A2B2 is not parallel to the plane (P).

## I think Maple makes a mistake...

AreParallel(E2F2,P); # false

`We can check:`
`point(Z,-1,-3,4);                                  IsOnObject(Z,P);`

## My code...

> restart;a:= [2*t +1,t-2,-2*t+2]:

b:=[2-m,3+m,4+m]:

with(geom3d):

plane(P,x - y+z-6=0,[x,y,z]):

line(d1,a,t):

line(d2,b,m):

plane(Q,x  - y+z + d=0,[x,y,z]): # Q parallel to P d<>-6.

coordinates(intersection(E,d1,Q)):

coordinates(intersection(F,d2,Q));

dis:=solve(distance(E,F) = 3*sqrt(6),{d}):

point(E1,subs(op(1, dis[1]),coordinates(E))):

point(F1,subs(op(1, dis[1]),coordinates(F))):

line(E1F1,[E1,F1],t):

Equation(E1F1):

point(E2,subs(op(1, dis[2]),coordinates(E))):

point(F2,subs(op(1, dis[2]),coordinates(F))):

Equation(line(E2F2,[E2,F2],t));

AreParallel(E1F1,P);

AreParallel(E2F2,P); # false

 First 6 7 8 9 Page 8 of 9
﻿