2
$\begingroup$

I have these two equations: $$f(x)=(\cos(\frac{n}{x} \pi)\cos(x\pi))-1$$ and $$g(x)=\sin^2(\frac{n}{x}\pi)+\sin^2(x \pi)$$ where $n$ can be any integer. These two functions are what mathematicians call "transcendental equations", ie. their roots can not be found through analytic means, but usually through numerical methods. These methods usually give approximations, but when I solve them with Mathematica, they found the exact integer roots. So, I'm asking how did they do this? What method did they employ?

$\endgroup$
11
  • 1
    $\begingroup$ I doubt its possible to know exactly. But notice the simple case: Solve[Cos[x Pi] == 1, x] is solved easily. One might guess that more complex versions (such as your f(x) and g(x) build on this kind of simple (and likely "built in") answer. $\endgroup$
    – bill s
    Commented Jul 23, 2019 at 14:47
  • $\begingroup$ Hmmm, maybe they check where $n/x$ is an integer and see whether $n$ is an integer as well? $\endgroup$
    – DUO Labs
    Commented Jul 23, 2019 at 15:41
  • 1
    $\begingroup$ It's pretty straightforward to guess the solutions to each using some logical arguments - not strictly symbol manipulation. I'm not sure how much of that MMA can do though. Maybe it finds numerical solutions and has some provision to test integers if the numerical solution is converging to the integer within some precision? Some of the folks here have a pretty deep knowledge of how these things work, maybe one of them will chime in. $\endgroup$
    – N.J.Evans
    Commented Jul 23, 2019 at 15:52
  • $\begingroup$ @N.J.Evans Maybe, I know the roots to $f(x)$ are maxima and for $g(x)$ it's minima-- so maybe they calculate the deriative, find all the zeroes in the range (somehow), then check all of them. However, I do't think that's true as for big $n$, there are a lot of extrema very close together. $\endgroup$
    – DUO Labs
    Commented Jul 23, 2019 at 15:55
  • 1
    $\begingroup$ Your equations are also algebraic for $n\in\mathbb{Z}$. Thus, methods of solving polynomial equations apply. I believe this is how MA does it. $\endgroup$
    – yarchik
    Commented Jul 23, 2019 at 20:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.