# why DSolve in V 12 returned an internal module variables with $on them in this example? Fyi, Reported to WRI in case it is a bug. [CASE:4288939] Is this supposed to happen? ClearAll[y, x, a]; DSolve[(1+(y'[x])^2)(ArcTan[y'[x]]+a x)+y'[x]==0,y[x],x]  Notice the $ on the variable K. I do not think I've seen this before, but may be I did and forgot.

Why it happens and is this considered a defect?

Btw, in V 11.3, this does not happen because the ODE is not solved

So this seems to be something new in V12.

V 12 on windows 10.

• "New Features" (guide/SummaryOfNewFeaturesIn120) mentions "improved nonlinear first-order equation solving." I'm not sure why you get a Module version of K instead of K[1], though. – Michael E2 Aug 11 '19 at 14:11
• You may know this, and it's not central to the question, but the solution of a Lagrange equation in the form $x=f(y′)$ can be given in terms of $K = y'$: $x = f(y'), y = \int y' \,dx = \int y'\,f'(y') \, d(y')$, which is equivalent to the algebraic system returned by DSolve. (Sorry, wanted to fix the typo in my earlier comment.) – Michael E2 Aug 11 '19 at 18:37

ClearAll[y, x, a];


From the documentation for DSolve: "DSolve can give implicit solutions in terms of Solve."

sol = DSolve[(1 + (y'[x])^2) (ArcTan[y'[x]] + a x) + y'[x] == 0, y[x], x]

(* Solve::svars: Equations may not give solutions for all "solve" variables.

Solve[{y[x] == 1/(a (1 + K$$8730^2)) + C[1], x == (-K$$8730 - ArcTan[K$$8730] - K$$8730^2 ArcTan[K$$8730])/( a (1 + K$$8730^2))}, {y[x], K$8730}] *)  Setting the arbitrary constant to zero. {x, y} = (sol[[1]] /. C[1] -> 0)[[All, 2]] // Reverse (* {(-K$$8730 - ArcTan[K$$8730] - K$$8730^2 ArcTan[K$$8730])/(a (1 + K$$8730^2)), 1/( a (1 + K$$8730^2))} *) vars = Variables[Level[x, {-1}]] (* {a, K$8730} *)

ParametricPlot[{x, y}, {a, -10, 10}, Evaluate@{vars[[2]], -1, 1},
FrameLabel -> {"x", "y"},
ColorFunction -> Function[{x, y, u, v}, ColorData["Rainbow"][v]]]