Mac Dude

1571 Reputation

17 Badges

13 years, 114 days

MaplePrimes Activity


These are questions asked by Mac Dude

This is one of these silly ones that crop up every-so-often (and yes, beta, gamma are just the relativistic v/c and energy):

gamma=1/sqrt(1-beta^2);
solve(%,beta);

comes up with ±I*sqrt(-gamma^2+1)/gamma.

While this is not wrong it is nothing I want to throw at any student trying hard enough as it is to keep his/her head above water. What I want is beta=sqrt(1-1/gamma^2) and I am having a devil of a time getting Maple to do this. even doing it "by hand" the I comes in the moment I take the sqrt. "assuming" does not help (and when I try ...assuming beta::positive, gamma > 1 I get an error claiming these to be inconsistent).

What gives?

Mac Dude

In physics as in math, we often use delta to indicate a (small but finite) variation in a parameter (e.g. delta x). Sometimes Delta (capital delta) is used for a larger variation, and there are even constructs like delta Delta x (a small variation of a larger variation in x). (Don't laugh or frown, this is being done & makes sense in certain situations.)

How do I write this best in Maple, esp. when I use 2-d math and am working on a (live-) script that may be handed out to others incl. students,? I.e. the appearance matters. Just writing delta x is interpreted (in 2-d input) as delta*x which is not what is meant (and leads to funny effects after the first simplify). If I write deltax (one word) then delta does not typeset in its proper greek form, which becomes an issue if you have many of these. I can write delta(x) and that often works (as long as you don't try to differentiate by x), but the typeset equation does not look right either (delta is not a function of x).

Is there a god way of doing this, or am I hitting a wall here?

TIA,

Mac Dude

 

I have an equation with the following structure:

sin(a)-sin(b)=0;

Maple can solve this:

solve(%,[b]);

[[b=a]]

so it misses the 2nd solution (b=π-a). I can use the allsolutions qualifier:

solve(%,[b],allsolutions);

and now Maple returns an expression that, while correct, is really not conducive to further work without fairly massive substition work (_Z10 has to be 0 and the solutions wanted have _B10 0 and 1). In a classroom settng this is not helpful. Try as I might using the options to solve I have not found a way to make this into a list of the two solution I want without extensively mucking around with the expression. Is there any way to coerce solve to return something simpler?

I really want something like

[b=a,b=π-a]

TIA,

Mac Dude.

 

I need to get rid of the type "constant" for gamma. In Maple, gamma is defined as Euler's constant by default. While it is easy enough to unprotect(gamma) and then get rid of its value, Maple will refuse to solve an equation for gamma, as it remains of type constant even after deassigning it. So I need to regain gamma as a variable.

Some may feel this is an unwise thing to do. But it actually is not: I am writing a document involving physics, and gamma is the accepted symbol for the relativistic energy. I cannot avoid using that, lest mass confusion ensues (this involves students). I really don't want to write gammar instead. Euler's constant, otoh, does not figure at all in my document.

Note that I need a solution that works in Maple 15 and later as I am working in a heterogeneous environment as far as Maple versions are concerned.

Thanks in advance,

Mac Dude

 

I am running into what looks like an interference between the Physics package and linear algebra, specifically when using the . (dot operator) to stand for matrix-vector multiplication:

I have a column vector and a matrix and need to evaluate the product matrix.vector. Usually this works fine and gives me the column vector with the result, just as expected. In this particular case (having with(Physics[Vectors]) at the top of the sheet) I get an error message:

Error, (in Typesetting:-delayDotProduct) invalid input: Physics:-Vectors:-`.` expects its 1st argument, a, to be of type Or({algebraic, procedure}, `=`), but received Matrix(3, 3, ...)

The Matrix it complains about is in fact the one I am sending it. It was created from a Physics:-Vectors object using the Component function (so it should be a regular Maple Matrix). In fact, the Matrix is the result of a LinearAlgebra:-MatrixInverse operation.

The weird thing is: This works when I am using 1-d input in Worksheet mode (which I am usually doing). In this case I am creating a sheet in Document mode using 2-d input as it is a sheet I will use in some teaching activity later this year, so I want it to look more polished. I can replace the dot with the relevant MatrixVectorMultiply function and it will work, but that is a kludge I don't think  should be necessary.

Anybody ever seen this? BTW, I am doing this on Maple 15 using the version of Physics that came with it.

Thanks,

Mac Dude

 

First 12 13 14 15 16 17 18 Last Page 14 of 23