How do you solve for the intersection of a line and a cosine function?

Click For Summary

Discussion Overview

The discussion revolves around solving for the intersection of a line and a cosine function algebraically, exploring various methods and approaches to find the point of intersection without graphical representation. It includes inquiries about specific techniques such as Newton-Raphson, analytical methods, and the use of arccosine.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant proposes the equation m*x + b = A*cos(B*x + C) + D and simplifies it to E*x + F = cos(B*x + C), suggesting that transcendental nature of cosine requires methods like arccosine or numerical approximations.
  • Another participant requests specific examples of how to apply various methods, including analytical solutions and the Newton-Raphson method, to a more complex equation involving cosine functions.
  • A suggestion is made that an approximation method like Newton-Raphson is the most manageable way to solve the proposed equation.
  • One participant notes that a graph can help estimate the number of solutions and intervals for the equation, emphasizing that solutions exist only if the linear function remains within the bounds of the cosine function.
  • Another participant shares an iterative method for solving equations like x = cos x, describing a process of repeated cosine evaluations until convergence is observed.
  • A later post introduces a complex function involving vertical asymptotes and prime numbers, proposing a method to narrow down solution ranges based on the behavior of the function.

Areas of Agreement / Disagreement

Participants express various methods and approaches to solving the intersection problem, but no consensus is reached on a single method or solution. Multiple competing views and techniques remain present throughout the discussion.

Contextual Notes

Some methods discussed depend on specific assumptions about the functions involved, and the applicability of techniques like arccosine may vary based on the form of the equations presented. The discussion also highlights the complexity of the functions and the potential for multiple solutions.

Edwin
Messages
159
Reaction score
0
Suppose you are given the equation of a line, and a given cosine function that the line intersects. How do you solve algebraically, that is non-graphically, for the point of intersection of the line and the cosine function?

Inquisitively,

Edwin
 
Physics news on Phys.org
So you want to solve m*x + b = A*cos(B*x + C) + D, which simplifies to E*x + F = cos(B*x + C).
Since cosine is transcendental, you will have to employ arccosine or the natural logarithm. You can also use the analytic series or Newton-Raphson, etc. to approximate x. Luckily, you need only look at x in the interval [(-1-F)/E,(1-F)/E].
 
Last edited:
Can you give me some specific examples on how I might use one of the four methods you mentioned above to solve an equation of the form

cos(f(x)*pi) - cos(pi*x) = mx + b?

Where f(x) is some function of x, pi is the number pi, and mx +b is the equation of the line that intersects the cosine function.

1) How would I use an analytical method to solve this?

2) How would I use the Newton Raphson method to solve this?

3) How would I use a natural logarithm to solve this?

I don't think I could apply an arccosine in this particular case unlike the case first mentioned above.

If you could give me a reference on the internet where I could look up the answers to the questions 1 through 3 above, that would be much appreciated.

Thanks for the help!

Best Regards,

Edwin
 
An approximation method like Newton-Raphson seems to be the only manageable way to get a solution for that equation. You can find the method explained http://planetmath.org/encyclopedia/NewtonsMethod.html .
 
Last edited by a moderator:
With a neatly drawn graph, you can get an idea of the number of solutions and even the intervals where they lie making search easier. First of all, for something like [itex]\cos x = Ax + B[/itex], a solution exists only if the right hand side lies between -1 and +1. Since the linear function is unbounded, this means solutions can exist only in some interval(s). You are probably interested in solving more complicated systems like [itex]\cos(f(x)) = Ax + B[/itex] but the basic idea remains the same. Depending on the nature of f(x), the slope [itex]\frac{-A}{B}[/itex] and the y-intercept [itex]B[/itex] it may be possible to estimate the number of solutions. A trivial example is something like [itex]y = k[/itex]. For solutions to exist, we must have [itex]|k| \leq 1[/itex].
 
I've done it iteratively before like for solving x = cos x.

I start off with a arbitarty number say x=.5. I take the cosine of it. Then I take the cosine of the output, and then the cosine of that output, and then the cosine of that output... You stop when you notice the values stop changing.
 
Thankyou! Taking your advice I propose then the following:


Consider the composite number C that is composed of 2 odd prime numbers a and b.

The following are one of two functions that have vertical asymptotes at plus and minus one, plus and minus the composite number C, and plus and minus the the prime numbers of any given composite C composed of two odd prime numbers x=a and x=b, that is C = a*b, where "a" and "b" are odd prime numbers.

f(x) = {1/(cos(k*x/2 + k*C/(2*x)) + cos(k*x) + 2) if (C+1)/2 is odd}

f(x) = {-1/(cos(k*x/2 + k*C/(2*x)) - cos(k*x)-2) if (C+1)/2 is even}

Where k is the constant pi, which is approximately equal to 3.141592654.

Your idea is to graphically determine a range that the solution to the equation exist within. What would be nice is to find a broad range, and then be able to narrow the range quickly.


For the case where (C + 1)/2 is an even integer, the following function might suffice.


f(x,y) = x*y - (-1/(cos(k*x/2 + k*C/(2*x)) - cos(k*x) - 2)),

Where {2<x<C}

There exists a vertical asymptote where this function tends to negative infinity at the prime factors of C (also at plus and minus C and plus and minus 1).

Where y is between 0 and 1.

For y near 0, the function is negative for almost all x between x = 0 and x = C.

For y near 1, the function is only negative on the following intervals:

{a-1<a<a+1}

{b-1<b<b+1}

Where a and b are the prime factors of C!


This means that if we start with y near 0, we can determine a range of values where the function above is negative, our prime factors exist in this range. Then to narrow the range, we increase y in managable increments towards 1, and narrow our range over which the function is negative. The result intervals over which the function is negative quickly narrows to within plus or minus 1 of our prime factors! A similar function can be derived for the case when (C+1)/2 is an odd integer!

One might be able to write up a computer program that can factor large composites C composed of two odd prime numbers, a and b!

Does this seem like it will work? Can you say RSA challenge numbers?

Ah, it's got to be to good to be true.

Inquisitively,

Edwin
 
Last edited:

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
33
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K