Can cos(a + 90 - b)=k.a be solved?

  • Thread starter kennethgilpin
  • Start date
In summary, the conversation discusses the possibility of solving an equation of the type cos(a + 90 - b) = k.a, given that b and k are known. It is determined that the equation cannot be solved analytically but can be solved numerically using methods such as Newton's method. One caution is that a bad initial choice can result in divergence, so it is recommended to use a "safe Newton/raphson" method that bounds the root within an interval and switches to another method if necessary. It is also noted that the equation can be solved using degrees within the interval [-180, 180].
  • #1
kennethgilpin
10
0
hi,

quick question, is it possible to solve an equation of the type:

cos(a + 90 - b) = k.a

to find a where b and k are known? Do you have to solve this by iteration?

kenneth
 
Mathematics news on Phys.org
  • #2
Hi kennethgilpin! :smile:

I very much doubt that your equation can be solved analytically. But I'm quite sure you can find a numerical answer. Let's define

[tex]f:\mathbb{R}\rightarrow\mathbb{R}:x\rightarrow \frac{\cos(x+90-b)}{k}[/tex]

take [itex]x_0[/itex] arbitrary and keep applying f on it. You'll get a sequence

[tex]x_0,f(x_0),f(f(x_0)),f(f(f(x_0))),...[/tex]

Compute the first few terms and see if it converges. If it doesn't, then we'll have to apply more powerful methods...
 
  • #3
We can group x and 90 and use the angle sum identity of cosine to say cos(x+90-b)=cos(x+90)cos(b)+sin(x+90)sin(b). We can use the same identity to say cos(x+90=cos(x)cos(90)-sin(x)sin(90)=-sin(x) and we can use the angle sum identity of sine to say sin(x+90)=sin(x)cos(90)+sin(90)cos(x)=cos(x). It follows that cos(x+90)cos(b)+sin(x+90)sin(b)=-sin(x)cos(b)+cos(x)sin(b). Therefore, cos(x+90-b)=cos(x)sin(b)-sin(x)cos(b).

We had to use the same identity twice, so I guess you could call it iterated.
 
  • #4
Sorry, didn't understand a thing the guys before me said xD sorry, but I'm guessing that it's not possible to find a FINITE answer as it is only one ecuation with three unknown answers.
 
  • #5
HeaVyJazZ said:
Sorry, didn't understand a thing the guys before me said xD sorry, but I'm guessing that it's not possible to find a FINITE answer as it is only one ecuation with three unknown answers.

TylerH misunderstood the question, and the word you're looking for isn't finite, it's "expressible in terms of elementary functions". The solution(s) are definitely finite.
 
  • #6
Thank you for your detailed replies.

although I was pretty handy at maths, that was 'A' level which was almost 20 years ago, so I don't understand the notation in micromasses answer.

I'm a physiological modeller, and solved the equation by induction, i.e. by knowing my upper and lower limit for the equation I picked a value halfway, then calculated an answer for both sides of the equation, then picked a value halfway between that and so on. I'm guessing that micromass was sort of suggesting that.

The problem is that this has to be done about 25 times (*10 iterations) and each iteration has floating point stuff that computers don't like. Having to solve things by induction is the bane of physiological modelling.

kenneth
 
  • #7
The numerical method you're applying is quite slow, as you can tell. Applying Newton's method however will be a lot quicker.

It's defined as follows:

[tex]a_n=a_{n-1}-\frac{f(a_{n-1})}{f '(a_{n-1})}[/tex]

And basically, this is how it works:

Since you need to solve for a (usually denoted as x), you let [tex]y=f(a)=ka-\cos\left(a+90-b\right)[/tex]

Then find its derivative, [tex]f '(a)=k+\sin\left(a+90-b\right)[/tex]

And for the first iteration, take a reasonably good guess at what the value of a is (denoted a0), then apply the Newton's method:

[tex]a_1=a_0-\frac{ka_0-\cos\left(a_0+90-b\right)}{k+\sin\left(a_0+90-b\right)}[/tex]

a1 will be a better approximation, then you apply the same formula to find a2 etc.EDIT: it's supposed to be f ' (a), LaTeX is screwing with me
 
  • #8
Ahh, I remember this from school. Presumably it only works if you can find a derivative of the original function.
 
  • #9
Yep, but unless you have other non-elementary functions that you're also dealing with, it shouldn't be a worry.
 
  • #10
One caution about Newton's method is that a bad initial choice can diverge. If you are programming this, it should be easy to find open source code for 'safe Newton/raphson', where you bound that a root must be in some interval. Then, the code detects a bad guess and uses another method for one iteration, going back to Newton thereafter. As long as you can find some bounds in which a root must be present, such codes are guaranteed convergent and quite fast.

In this case, for example, you can guarantee there is s root between [-pi,+pi].

[EDIT: oh, you are using degrees; make that between [-180,180] ]
 
Last edited:

1. Can cos(a + 90 - b)=k.a be solved?

Yes, it can be solved using trigonometric identities and algebraic manipulation.

2. What is the purpose of solving cos(a + 90 - b)=k.a?

The purpose is to find the value of the variable, a, in terms of the constant, k, and the other variables, b and a.

3. Is there a specific method for solving cos(a + 90 - b)=k.a?

There are several methods, such as using the sum and difference identities for cosine, or converting the equation to an equivalent form using the Pythagorean identity.

4. Can the solution for cos(a + 90 - b)=k.a be expressed in terms of trigonometric functions?

Yes, the solution can be expressed in terms of sine, cosine, and tangent functions, depending on the method used to solve the equation.

5. Are there any restrictions on the values of a, b, and k for the equation cos(a + 90 - b)=k.a to have a solution?

Yes, the values of a and b must be within a certain range in order for the equation to have a solution. Additionally, k must be a non-zero real number.

Similar threads

  • Biology and Chemistry Homework Help
Replies
2
Views
956
Replies
4
Views
1K
Replies
9
Views
1K
Replies
1
Views
9K
Replies
2
Views
856
Replies
5
Views
937
  • General Math
Replies
11
Views
1K
Replies
1
Views
10K
  • General Math
3
Replies
92
Views
6K
Back
Top