how do i find values of x when cosx=3x?
You first come to terms with the fact that there is no analytical solution. Second, realize that -1 <= cos(x) <= 1, so that -1 <= 3x <= -1. This restricts your solutions to -1/3 <= x <= 1/3 Now, you just need to use your favorite numerical procedure to track down any solutions.
thank you!
What did you get?
currently trying to figure it out now
actually im stuck how exactly do i try and get solutions from the restriction? do i just guess and check?
Maybe. What course are you in? Let's pick the right method.
calc 1
Then you have met the derivative?
yeah
How about "Newton's Method"?
exactly what we're learning right now
Perfect. We need to create a function to solve. f(x) = cos(x) - 3x How's that one? We need to know what that thing is zero. Right?
right so do i find the derivative of it first?
Exactly. Find f'(x).
so that's -sinx-3
Perfect. Now build the formula. \(x_{i+1} = x_{i} - \dfrac{f(x_{i})}{f'(x_{i})}\) Is it looking familiar, yet?
yeah and so from there what would i use for xi?
That, is an EXCELLENT question. One that is not easily solve in every circumstance. We're in luck on this problem, though, as we have already narrowed the solutions to [-1/3,1/3]. A real quick look at the graph of y = cos(x) and y = 3x shows that the solution is pretty close to the upper range. Let's start with \(x_{0} = 0.3\). Truthfully, we made this range so narrow from the start, it's kind of hard to go wrong. Use anything in [-1/3,1/3] and you'll get where you need to be in just a few steps.
We await \(x_{1}\) with great anticipation!!
ok so i got \[x_1{}=.32046...\] for 1/3
You started with \(x_{0} = 1/3\)? I get \(x_{1} = 0.316789951084538\) when I do that. No matter. Newton's Method is often self-correcting. What do you get for \(x_{2}\)?
i got .3158826957
Not sure why your results are jumping around so much. Are you calculating the sine and cosine and truncating severely? If you don't use your calculator memory, you lose precision. Anyway, you are closer. Two more. If it doesn't jump around too much because of whatever rounding or truncation you are using, you'll have a very good approximation.
i forgot that i can store numbers on my calculator and im starting to use it now
so i got .3169515241 and .3167043007 for the last two
Definitely something funny going on, there. The idea is that the value will settle down and stop moving around. Without watching you do it, I can't tell why your results are not doing that. I get the following, when starting with x0 = 0.30000 0.3 0.316791427651924 0.316750829007707 0.316750828771221 0.316750828771221 and it quits jumping around. I suggest you try to reproduce these results and figure out why your values are not quite as they should be. I get this when starting with x0 = 1/3 0.333333333333333 0.316789951084538 0.316750828990819 0.316750828771221 0.316750828771221 And again, it has quit jumping around.
Well, I need to get my beauty sleep, so that's what there is, tonight. Track down your precision problem and you'll have it!! Good work.
thank you so much!
Join our real-time social learning platform and learn together with your friends!