DSolve returns a Solve expression [closed]

I want to solve the differential equation $\frac{g'(x)g''(x)-g(x)g'''(x)}{xg'''(x)+2g''(x)}=B$, with $B$ an arbitrary constant, so I entered the following into Mathematica:

DSolve[(g'[x]*g''[x] - g[x]*g'''[x])/(x*g'''[x] + 2*g''[x]) == B, g[x], x]

But this returns a solution which is a coupled Solve expression for $g(x)$ and a new constant K$5705:$\text{Solve}\left[\left\{x=\int \frac{\frac{(2 \text{K$\$$5705}-B) \exp \left(-\frac{3 B \tan ^{-1}\left(\frac{B}{\sqrt{4 c_1-B^2}}-\frac{2 \text{K\$$5705}}{\sqrt{4 c_1-B^2}}\right)}{\sqrt{4 c_1-B^2}}-c_2\right)}{2 \sqrt{-B \text{K$\$$5705}+c_1+\text{K\$$5705}^2}}+\frac{6 B \sqrt{-B \text{K$\$$5705}+c_1+\text{K\$$5705}^2} \exp \left(-\frac{3 B \tan ^{-1}\left(\frac{B}{\sqrt{4 c_1-B^2}}-\frac{2 \text{K$\$$5705}}{\sqrt{4 c_1-B^2}}\right)}{\sqrt{4 c_1-B^2}}-c_2\right)}{\left(4 c_1-B^2\right) \left(\left(\frac{B}{\sqrt{4 c_1-B^2}}-\frac{2 \text{K\$$5705}}{\sqrt{4 c_1-B^2}}\right){}^2+1\right)}}{B+\text{K$\$$5705}} \, d\text{K\$$5705}+c_3,g(x)=\sqrt{-B \text{K$\$$5705}+c_1+\text{K\$$5705}^2} \exp \left(-\frac{3 B \tan ^{-1}\left(\frac{B}{\sqrt{4 c_1-B^2}}-\frac{2 \text{K$\$$5705}}{\sqrt{4 c_1-B^2}}\right)}{\sqrt{4 c_1-B^2}}-c_2\right)-B x\right\},\{g(x),\text{K\$$5705}\}\right]$

I don't understand this solution; why does it solve for $K$ and $g(x)$ when I'm just looking for $g(x)$ for any $x$?

closed as off-topic by MarcoB, Itai Seggev, LCarvalho, b3m2a1, garejAug 17 '17 at 5:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – MarcoB, LCarvalho, b3m2a1, garej
If this question can be reworded to fit the rules in the help center, please edit the question.

• It is not solving for x. It is actually solving for g[x]. The result is in fact Solve[{x == expression1, g[x] == expression2}, {g[x], K$174204}], which indicates that it is trying to solve for g[x] and K. Solve probably doesn't know how to solve that equation explicitly (if it is even possible). – MarcoB Aug 15 '17 at 18:28 • Part of the problem is an unevaluated integral, with which one could eliminate the K variable (note K is a function of x, not a constant). This is the best M could do with your problem. That's not to say there isn't a way to get it unstuck, but it might take considerable cleverness (or it might not be possible). – Michael E2 Aug 15 '17 at 19:00 1 Answer FWIW, there is a minor bug, in that it shouldn't be returning temporary variables lik K$174204 but the standard K, ... I've reported this to the relevant developer.

Note, however, that if Solve did know how to solve the equations, it would return a rule g[x]->expr, just like DSolve wants to return. So on some level, this answer is correct. This point is the 4th bullet point of the details of ref/DSolve, which also has a link to an example illustrating it.

By comparison, DSolveValue returns unevalated for this input, precisely because it can't construct an explicit expression for g[x] to return.