Any math wizards out there?

Here is the formula I was given by a coworker.
He asked if I could solve for x.

y = tan(x) - (x*PI/180)

I have failed. Can anyone else solve this?
This formula will find the y value if you know what x is, but we want to reverse it so that it will find the x value if we know what y is.

Good luck...
This function has no inverse. Check out the graph: http://po.st/ZVqvwH
Hmmm.. that is interesting. Thanks.
If you restrict the domain to (-pi/2;pi/2), the function becomes a bijection. f(x) = y, then f-1(a) = b such that atan(b) = b * 180 / pi - a * 180 * pi
Just out of curiosity, what are your measurement units? Your equation looks highly unusual:

x*\pi /180 is the formula to convert from degrees to radians

so I am suspicious that your coworker made a measurement unit error (perhaps not, but then the equation is highly unusual).

Do you actually want to solve this problem (say, by writing a program that gives you an approximate value of y), or was your coworker challenging you just to show off (say, his math mojo)?

Do you have restrictions on how fast your subroutine finding y should run?

Do you have upper bounds on y? [Edit] on a second thought that doesn't sound necessary. You can always say something like: "if y>10^100, we assume that x is approximately equal to \pi/2", and then work within a reasonable range for y.

Do you have requested answer precision for y?
Last edited on
Well to be honest with you, my coworker is an engineer, and he has solved the problem. He asked for my help because I was always good at math but I could not help him this time. I have never been to college and this was a bit out of my range of math skills. But since he did some research on line and found a working solution he likes then all is well. Thanks for your help everyone.
Whenever working with periodic functions (like trigonometric ones) it is common to restrict the input (domain). Judicious restrictions make many a function a "bijection", meaning that every input corresponds to exactly one output.
Unfortunately, I don't have an answer to what x is (too lazy and or a bit too busy), however I can give you the domain restriction. Restriction of the domain itself is a pretty big step in the problem, as this implies that the exact value of x, that we claim to exist, is within these bounds.

Domain:
x is defined as all real numbers R that are:

1.) Greater than pi(n+0.5)
2.) Less than pi(n+1.5)

Where n is defined as an element within a set of real values Z.
Where Z is the set of integers (ring of integers).

Hope this helps.

T.Kim
Last edited on
This is kind of old, so please let me know if you are no longer interested in the problem.

Graphically, your problem is: find the intersections of the graph of $y=x$ with the graph of the tangent function.
As seen on the graph plotted by ResidentBiscuit, the tangent function consists of infinitely many strips of width \pi. Therefore the graph of $y=x$ will have infinitely many intersections with the graph of \tan x, exactly one for each interval of the form ( \pi(n-1/2) , \pi(n+1/2) ).

Since you will have infinitely many solutions, you have to specify your favorite interval where you want to find a solution. Or perhaps you have an additional input of specifying in which interval you are looking for a solution?


As far as the solution is concerned: I would **definitely** use Newton's method. Below are the slides with which I teach Newton's method. It would be dead easy to implement. The function with respect to which you will be applying it is
f(x)= \tan x - x - y
(y is a constant here, input by the user).
To the formulas for Newton's method, you will simply need f'(x) = 1/(\cos x)^2 -1 = (\tan x)^2. The vertical strip in which you end up finding your solution will be determined by your starting point. Newton's method in this context should be no more than 5 lines of code ...



https://s3.amazonaws.com/piazza-resources/hqw035yoi7opm/htvp8t121nz5rx/Lecture_18_Newtons_Method_SKIPPED_WILL_NOT_BE_TESTED_2014_Spring_Calc_I.pdf?AWSAccessKeyId=AKIAJKOQYKAYOBKKVTKQ&Expires=1417170389&Signature=TDHbh8%2FPZL%2BkdfJTRGmybjPrNkk%3D

Hope you still have any use for my post, if not, cheers!
Last edited on
Topic archived. No new replies allowed.