Subject: xmaxima : how to declare a positive scalar?
From: Blair Smith
Date: Sat, 18 Feb 2006 04:37:02 -0600
Dear Maxima users,
I have a simple problem, solving a general rotated cone equation to find
the
extents of an ellipse cross section at a plane x=const. I can do this
by hand
but it's messy and error prone because I'm dealing with completely general
cones.
So first I wanted to check to see if supplying constraints could help
Maxima
find a solution. I'll write a separate query about that later.
The more basic question is how can one declare a symbol a positive scalar
to perhaps help Maxima determine a valid solution? (e.g., I can make sure
the cone axis does not lie in a zy plane to ensure the ellipse is
well-defined)
I could only work out how to do this for a single expression
asksign(a); ... p;
after which
sign(a);
returns PNZ again.
I read stuff about contexts, but I couldn't figure out how to add "a" to
the symbol table that stuff can be assumed about, nor could I see how
to make Maxima assume "a" is positive. I could define a=b^2 for
some constant b but then how do I say that b is non-zero?
I suspect this may help me solve the original problem since I can then
(at least implicitly) specify the plane intersects the cone in an ellipse.
Related: how else can one solve equations (e.g. nonlinear optimization)
using constraints? Say with Lagrange multipliers? Do you think Maxima
could cope? I hope so, I'll try it tomorrow.
--
Dr Blair M. Smith
Medical Physics Group
Department of Physics & Astronomy
Louisiana State University
202 Nicholson Hall
Baton Rouge, LA 70803