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

1. ## 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

2. ## 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:

$\displaystyle \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.

3. ## 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

4. ## 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

5. ## 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):

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

Rearrange to get the square root term by itself:

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

Square both sdes:

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

Rearrange to get the unknown B into a quadratic equation:

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

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

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

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