# COS(A+B) Problem - Whats COS A?

• Feb 1st 2013, 06:30 AM
goldk911
COS(A+B) Problem - Whats COS A?
Hi i'm new,

I have been trying to solve this for a couple of days and had to just give up. :( Hopefully it is in the right topic.

I have a system which gives me the answer to COS(A+B) and I can work out what B is.

Therefore:-

COS(A+B) = (Known Varible Output)
B = (Known Constant)

What is COS A ?
(I don't need to know what A is - just COS A)

The solution needs to work for a full COS cycle (i.e. 0 to 2PI) therefore the answer is not COS((COS-1(A+B))-B) !

I have been trying to use COS(A+B)=COSACOSB-SINASINB
and COS^2(A)+SIN^2(A)=1
with no luck just can't seem to be able to rearange the formula.

If anyone can solve this I would be very thankful/amazed.

Dave
• Feb 1st 2013, 11:22 AM
ebaines
Re: COS(A+B) Problem - Whats COS A?
Given values for cos(A+B) and B, there are two possible values for cos(A). You're on the right track, all you need is to recognize that the arccosine of a number may be either positive or negative:

$\cos(A) = \cos(\pm \cos ^{-1}(\cos(A+B)-B)$

For example if B=60 degrees and cos(A+B) = 0.5, possible values for cos(A) are 1 and -0.5. In other words values for A of 0 and 240 degrees are both valid.
• Feb 2nd 2013, 01:26 PM
goldk911
Re: COS(A+B) Problem - Whats COS A?
Hi,

The problem is when you use cos-1 you basically loss info and therefore would like not to use it.

If you combine

COS(A+B)=COSACOSB-SINASINB

And

COS^2(A)+SIN^2(A)=1

You get

Cos(a+b)=cosacosb-(sqrt(1-(cosa)^2))sing

Which can be simplified with

A=BC-(sqrt(1-(B)^2))D

Can anyone here re-arrange this so B=

Thus no info is lost.

I would be really impressed if someone could.

Dave
• Feb 2nd 2013, 01:28 PM
goldk911
Re: COS(A+B) Problem - Whats COS A?
Sorry not

Cos(a+b)=cosacosb-(sqrt(1-(cosa)^2))sing

Cos(a+b)=cosacosb-(sqrt(1-(cosa)^2))sinb

Auto correct :(
• Feb 4th 2013, 06:24 AM
ebaines
Re: COS(A+B) Problem - Whats COS A?
Using your nomenclature: you have A=BC-(sqrt(1-(B)^2))D, where A, C and D are known values and you want to solve for B. Here A=cos(a+b), B= cos(a), C=cos(b), and D=sin(b):

$A=BC-(\sqrt{1-B^2})D$

Rearrange to get the square root term by itself:

$(\sqrt{1-B^2})D = BC-A$

Square both sdes:

$(1-B^2)D^2 = (BC-A)^2 = B^2C^2- 2BCA + A^2$

Rearrange to get the unknown B into a quadratic equation:

$-B^2(D^2+C^2) +B(2CA) +(D^2-A^2) = 0$

Note that $D^2 + C^2 = 1$:

$B^2 -B(2CA) + (A^2-D^2) = 0$

$B = \frac { 2CA \pm \sqrt {C^2A^2 -4(A^2-D^2)}}{2}$