# [Maxima] How to simplifiy a*sin(x)+b*cos(x)

Judy Toth judyt2009 at comcast.net
Fri Sep 5 09:15:58 CDT 2008

```This is not exactly what you are looking for but it is similar.  Maybe you can find a way from this.

(%i1) (a+b*%i)*(c+d*%i);
(%o1) (%i*b+a)*(%i*d+c)
(%i2) polarform(%);
(%o2) sqrt((a*c-b*d)^2+(a*d+b*c)^2)*%e^(%i*atan2(a*d+b*c,a*c-b*d))
(%i3) expand(%);
(%o3) sqrt(b^2*d^2+a^2*d^2+b^2*c^2+a^2*c^2)*%e^(%i*atan2(a*d+b*c,a*c-b*d))
(%i4) factor(%);
(%o4) sqrt(b^2+a^2)*sqrt(d^2+c^2)*%e^(%i*atan2(a*d+b*c,a*c-b*d))

Hope this helps

Rich

------------Original Message------------
From: Cloud_Chu at ap.logitech.com
To: maxima at math.utexas.edu
Date: Fri, Sep-5-2008 0:04 AM
Subject: [Maxima] How to simplifiy a*sin(x)+b*cos(x)

Hello Sir,

We are using WxMaxima 0.7.6 for solving some question. Now we want to change a*sin(x)+b*cos(x) into (a^2+b^2)^(1/2)*sin(x+atan(b/a)). By which function I can do this simplification?

Thank you and have a nice day!
Cloud
_______________________________________________
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/20080905/1d0d0d46/attachment-0001.htm
```