# [Maxima] A Question about a trigonometric identity

Richard Hennessy rich.hennessy at verizon.net
Mon Nov 16 19:25:15 CST 2009

```Martin,

You have to do it yourself.  Here is a partial derivation, reverse the steps and you can finish it yourself.

(out23) a*sin(x-b)
(%i24) trigexpand(%);

(out24) a*(cos(b)*sin(x)-sin(b)*cos(x))   /* law of sum and difference between 2 angles is applied by trigexpand */
(%i25) %/cos(b);

(out25) a*(cos(b)*sin(x)-sin(b)*cos(x))/cos(b)
(%i26) expand(%);

(out26) a*sin(x)-a*sin(b)*cos(x)/cos(b)
(%i27) ratsubst(tan(b),sin(b)/cos(b),%);

(out27) a*sin(x)-a*tan(b)*cos(x)
(%i28) ratsubst(B,a*tan(b),%);

(out28) a*sin(x)-cos(x)*B

Etc...

Now go figure out A.  B=a*tan(b)

This is the basic idea

Rich

----- Original Message -----
From: Stavros Macrakis
To: Richard Hennessy
Cc: Martin Mallinson ; maxima at math.utexas.edu
Sent: Monday, November 16, 2009 7:04 PM
Subject: Re: [Maxima] A Question about a trigonometric identity

Yes, but as far as I know there is no easy way in Maxima to convert in this direction:

a*sin(x)+b*cos(x) => q*sin(x+r)

The other direction is of course trivial -- expand(trigexpand(...))

-s

On Mon, Nov 16, 2009 at 6:17 PM, Richard Hennessy <rich.hennessy at verizon.net> wrote:

a*sin(b)+c*cos(b) is always a phase shift with a possible amplitude change
as well.

Rich

----- Original Message -----
From: "Martin Mallinson" <Martin at mallinson.homeip.net>
To: <maxima at math.utexas.edu>
Sent: Monday, November 16, 2009 1:35 PM
Subject: [Maxima] A Question about a trigonometric identity

>I am new to Maxima, never having used this mailing list before, and I
> wonder
> if anyone can help clarify this small problem I have?.
>
> eq1: R = (3^(3/2)*sin(z)-3*cos(z))/4;
> trigrat(%);
> print("Maxima fails to simplify the expression. But...");
> subst(z1+%pi*2/3,z,eq1);
> trigrat(%);
> subst(z-%pi*2/3,z1,%);
> print("Maxima now shows us that eq1 was in fact just a phase shift");
> print("How can I get Maxima to show this without the two subst
> operations?");
>
> My problem of course, is that I had to guess that the expression was a
> simple
> phase shift, had I not guessed this, I would never have got there...
>
> Thanks for any help
> Martin M
>
> By the way - thank you all for supporting Maxima. I had the pleasure of
> working with Macsyma on the Symbolic XL1200 -- I have the original
> Symbolics Macsyma documentation someplace. It is wonderful to have
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima

------------------------------------------------------------------------------

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20091116/591c2682/attachment-0001.htm
```