# How to obtain the solution of an ODE in implicit form?

I want to get the general solution of a first-order ODE in implicit form. It should be something like this:

1. With input y'[x] == 1, the desired output is C->y[x] - x.
2. With input y'[x] == 1/y[x]^2 (nonlinear ODE), the desired output is C->y[x]^3/3 - x

DSolve tries to evaluate the explicit form of y[x] by default. Is it possible to keep the implicit solution?

I tried explicit equation integration using Integrate and tracing (Trace with TraceInternal -> True). Neither helped me with this problem.

• Strongly related, if not duplicate: mathematica.stackexchange.com/q/137598/1871 – xzczd Oct 14 '18 at 12:48
• But this seems not to work correctly. Quiet@Trace[DSolve[y'[x] == 1, y[x], x], Solve[e_, y[x]] -> (eqn = e), TraceInternal -> True]; eqn returns -1 + y[x] == 0 with no integration constant – Ilya Oct 14 '18 at 12:54
• Yes, and that's the reason I didn't vote for close as duplicate. – xzczd Oct 14 '18 at 13:04

eq = y'[x] == 1; (* try also eq = y'[x] == 1/y[x]^2 *)