People on this forum have been unbelievably helpful. I am trying to write some worksheets to help flatten the learning curve for folks who are new to MAPLE. Trouble is, being not far from the newbie stage myself, I may very well be making significant mistakes about the capabilities of MAPLE and thus teaching people cumbersome and inefficient ways of doing things. With that in mind, if anyone has the time to critique the following, I would be most appreciative.

Our goal is to derive the formula Maple EquationMaple Equation

MAPLE tells us this is the correct formula

> Maple Equation

In general, angle addition formulae can be obtained by the expand operation, e. g.

> Maple Equation

In the case of the sine of the sum of two angles, we can obtain the inverse of expand by using combine

> Maple Equation

However, this does not work in the case of the tangent of a sum of angles

> Maple Equation

Let's see how we may derive Maple Equation from the identity tan(x) = Maple EquationLet's try this

> Maple Equation

That's not exactly what we want - we want one numerator and one denominator. Let's try this...

> Maple Equation

Much better. If we were doing this with a pencil and paper, we would at this point divide both the numerator and the denominator of expr1 by Maple Equation. Unfortunately, MAPLE's automatic simplification makes this problematic, as shown below...

> Maple Equation

Not much help. What happened (I think) is that MAPLE looked at the expression on the right side of and said to herself "this clown is dividing top and bottom by the same amount so the value of the expression isn't changing. I think I'll throw him a curve by simply flipping the sign of both the numerator and the denominator". Which brings me to the next

!!!!!QUIRK ALERT!!!!!

If you have an expression like, for example, expr1:= Maple Equation, don't be too surprised to find that

numer(expr1) = -(Maple Equation) and denom(expr1) = Maple Equation. This multiplying of both the numberator and denominator by -1 is apparently random and can be disconcerting when you first encounter it. In fact, a number of times I have constructued a worksheet in which the values of both numer() and denom() of an expression flipped between positive and negative each time I ran the worksheet, without my having made any changes to the worksheet! The good news is that if one is changed then so is the other so the value of numer()/denom() is unchanged.

Getting back to , MAPLE doesn't like double decker fractions and so simplifies them. Most of the time this is good but often when working with equations it would be helpful to temporarily turn off this sort of simplification but as far as I can see there is no way to do this. Because of this it will be necessary to independently consider the numerator and denominator of expr1.

> Maple Equation

let's divide both by Maple Equation

> Maple Equation

There you go again MAPLE, trying to be helpful and messing me up! After doing the division MAPLE simplified, giving me a fraction when I really wanted a sum. I repeat - it would be helpful to be able to turn off automatic simplification. Let's try again...

> Maple Equation

Much better. Now for the substitution equations. I just copied the first and than changed 4 occurances of 'a' to 'b'.

> Maple Equation

> Maple Equation

We can't use subs on den2. That's because sin(a)/cos(a) and sin(b)/cos(b) don't exist as seperate units in den2. We have to use algsubs, which is more sophisticated. Unfortunately, algsubs doesn't accept sets for its first argument, so we have to make 2 substitutions. It's not as cumbersome as it looks. I just copied the first 2 statements and then modified them. Notice how the second argument in the second call to algsubs is % rather than den2. (why?). See what happens in (12) if you get rid of the first expand(%) command.

> Maple Equation

any finally

> Maple Equation

If you're thinking "that's alot of work to solve a relatively simple problem" I would agree with you. For relatively simple manipulations the pencil and paper method is usually better. In fairness to MAPLE, let's see how it would have been done without all the false starts...

> Maple Equation

> Maple Equation

> Maple Equation

> Maple Equation

> Maple Equation

> Maple Equation

Using cut & paste it didn't take me too long to write the above stuff. Notice how the top and bottom of are the negative of what they were before. Go figure!

> Maple Equation

This post was generated using the MaplePrimes File Manager

View 2292_Tan(a+b).mw on MapleNet or Download 2292_Tan(a+b).mw
View file details


Please Wait...