Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

x = cos(x)

Status
Not open for further replies.

Barry Hardhouse

New Member
Hi All,
Old member under a new alias - for some reason my old account lost the ability to post anything. Besides, it was high time I anonymised my stupid questions. Speaking of same...

If I have an equation of the form x = cos(x), how would I solve it?
Wolfram show us that it has one solution - see image - but not how to find it.

More generally, the equation I'm interested in looks more like
y = ax + cos(x)
which might have several solutions, or none. But I'd be happy starting with the simpler case for now.

A similar problem is discussed here
but I can't seem to extract what I need from it.

Any help much appreciated!
 

Attachments

  • xcosx.png
    xcosx.png
    9.1 KB · Views: 262
Simply iterate over and over. For example, start with x1 = cos (0.7), based on an initial guess of the value on the chart (value in radians).
Take the answer and do the x2 = cos(x1). Keep repeating x3 = cos(x2), etc. and eventually it iterates down to the final value (or darn close to it)
I use the scientific calculator in Windows, and just keep hitting COS button of the current displayed value (after the first guess). Make sure you are set to radians. Eventually you get down to a number close to 0.7390851
 
Hi Sagor, thanks for the reply & pointers.
I'm aware that I could do it numerically. If that's the only way of doing it then that's great, but I wondered if there was an algebraic way - that I could also apply for the more general case of y = ax + cos(x).
It seems like such a simple expression should have a simple solution. Perhaps it doesn't?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top