restart;
with(plots):
with(VectorCalculus):
I have 3 points in a plane defined in Maple as:
P:= <1,3,1> : Q := <1,9,7> : R := <0,6,6> :
I'm using the two vectors with common point P, to create two vectors in the plane in vector component form
PQ := <0,6,6> : PR := <-1,3,5> :
I take the cross product of these two vectors to get the vector normal to the plane containing P, Q, and R.
n1 := Cross Product(PQ,PR)
n1 = <12,-6,6>
I define a function representing the plane in standard form using the point R first. The teacher wants me to use the other two points as well to show that I still get the same equation, but I can't even get this one part to work.
f1 := (x,y,z) -> 12 * (x - 0) - 6 * (y + 6) + 6 * (z + 6) = 0;
f1 = (x,y,z) -> 12x + VectorCalculus:-'-'(6y) + 6z = 0
the next step is to solve for z so that I can put that equation into some method defined by Maple that plots planes, or at least that's what I'm pretty sure of, but I can't even get
solve(f1,z)
to work. It gives me a warning and never solves it. The warning reads:
Warning, solving for expressions other than names or functions is not recommended.
but isn't that what I did when I defined f1? Didn't I tell Maple that f1 is a function with variables x, y, and z and is defined by the equation 12 * (x – 0) – 6 * (y + 6) + 6 * (z + 6) = 0 ?
FINAL EDIT w/ workaround
I stopped worrying about defining the equation of the plane as a function, and was always stuck with that stupid VectorCalculus:-'-' thing in there that I don't know how to get rid of. Other than that, the equation it pumped out was correct (removing the VectorCalculus bit of course) so I wrote it out into the solve method as such:
solve(12*x - 6*y + 6*z, z)
resulting in the desired
z = -2x + y
I then typed that directly into the implicitplot3d method with bounds and it worked.
The only other thing that I had to type in directly instead of using the variable name is my n1 which I was also required to plot as an arrow object normal to the plane that I found. All in all, it seemed like it was just being buggy. There was no reason why my n1 defined as <12,-6,6> should not have been an acceptable argument for the first parameter of the arrow object.
What's more strange is that when I tried to define the equation of the plane orthogonal to the plane with PQR as a function, it didn't have the wonky Vector Calculus thing in it. If anybody can explain this, that'd be great. I would share the file so that you could point out what I did wrong, but IDK how.
Best Answer
As in other post, I think you should do it as follows: