# How can I be sure that Mathematica can or can't solve this equation?

I want to solve the following equation for $$x$$:

eq = (g^2 π^2)/(128 x^2) + (4 x^2 y)/π - 1/16 k^2 Log[(2 x)/(π q)] == c
Solve[eq, x]


in which all the parameters are positive. Running this code for a long time does not lead to answer. How can I be sure that Mathematica can or can't solve this equation?

• In general, practically speaking, I don't think you can be sure, unless one has special knowledge about the equation and techniques to solve it. In cases such as this in which there are parameters, you can replace them by typical exact values, like this: Solve[eq /. {g -> 1, k -> 1, q -> 1, c -> 1}, x] (result Solve::nsmet, can't be solved). It's usually much faster, since the complexity of analyzing parameters usually grows extremely fast with the number of parameters. If the special case cannot be solved, then probably the general case cannot be solved either. Commented Jun 8, 2021 at 16:02
• Here's a small suggestion that often helps, but alas not here: merge and eliminate unneeded variables: let $g^2 \pi^2/128 = a$, let $4 y/\pi = b$, and so on. Then let $x^2 = z$ (a new variable). I think, though, that for your particular equation there is no closed-form solution. Commented Jun 8, 2021 at 17:13
• Solve is likely to spend serious time trying transformations to obtain a solution using ProductLog. I doubt one exists though. Commented Jun 8, 2021 at 18:16
• @MichaelE2 Thanks a lot. Yes, by this way one can check if the equation can be solved or not by spending little time. Commented Jun 8, 2021 at 20:22
• As a rough rule of thumb, the presence of transcendental functions generally reduces the odds of getting an a closed form solution for the equation, barring certain special cases. Commented Jun 11, 2021 at 13:03

The equation can be set into a form

$$\dfrac{A}{x^2} + B x^2 y = P \log x +Q$$

so it can be solved algebraically, no need to use Mathematica:

$$y(x) = \dfrac{ P \log x + Q - \dfrac{A}{x^2} }{Bx^2}$$

For some arbitrarily chosen constants the above is plotted... and level contour lines can be drawn if so required.

It may help to understand the physical significance of the constants in the phenomenon.

EDIT1:

You can also get $$x=f(y)$$ at uniform $$y$$ increments with numerical integration of ode

$$\dfrac{dx}{dy}=\frac{B x^5}{Px^2-2 Bx^4 y -2A} ;$$

• Thanks for the answer. In fact I need the analytic solution of the equation. Using numerical methods I could move the issue forward. I wonder if the analytic solution can be found. Commented Jun 8, 2021 at 20:18
• Can be found as $y=f(x)$ added in answer. Commented Jun 8, 2021 at 21:03
• I want to find x not y. Commented Jun 10, 2021 at 11:15
• No analytical solution for transcendental functions. ..A table of $x\; vs \;y$ for uniform x increments is straightaway possible numerically . Using a differential equation $y \;vs\; x$ can be also tabulated as a workaround. Do you want it? Commented Jun 10, 2021 at 17:16