No answer is given and no error message as well for this expression.
DSolve[X*Y''[X] + (3*X^3 - 1) Y'[X] == C, Y[X], X]
Hope someone can help me. I really appreciate that.
No answer is given and no error message as well for this expression.
DSolve[X*Y''[X] + (3*X^3 - 1) Y'[X] == C, Y[X], X]
Hope someone can help me. I really appreciate that.
Try:
sol = First@Block[{Integrate}, DSolve[X*Y''[X] + (3*X^3 - 1) Y'[X] == C,
Y[X], X] /. {Integrate -> Inactive[Integrate]}] // Simplify
$\left\{Y(X)\to \int _1^X\exp \left(\int _1^{K[3]}\left(\frac{1}{K[1]}-3 K[1]^2\right)dK[1]\right) \left(c_1+\int _1^{K[3]}\frac{C \exp \left(-\int _1^{K[2]}\left(\frac{1}{K[1]}-3 K[1]^2\right)dK[1]\right)}{K[2]}dK[2]\right)dK[3]+c_2\right\}$
Activate[sol] (* Integrate can't find closed solution *)
Result in V12 (tested in V12.2):
DSolve[X*Y''[X] + (3*X^3 - 1) Y'[X] == C, Y[X], X]
(*
{{Y[X] -> C[2] + Inactive[Integrate][(E^-K[1]^3 C[1] K[1] -
1/3 C E^-K[1]^3 Gamma[-(1/3), -K[1]^3] (-K[1]^3)^(1/3)),
{K[1], 1, X}]}}
*)
Original answer
From Why Can't `DSolve` Find a Solution for this ODE?, which might be considered a duplicate:
ClearAll[withTimedIntegrate];
SetAttributes[withTimedIntegrate, HoldFirst];
withTimedIntegrate[code_, tc_] :=
Module[{$in}, Internal`InheritedBlock[{Integrate}, Unprotect[Integrate];
i : Integrate[___] /; ! TrueQ[$in] :=
Block[{$in = True}, TimeConstrained[i, tc, Inactivate[i, Integrate]]];
Protect[Integrate];
code]];
withTimedIntegrate[{dsol} = DSolve[XY''[X] + (3X^3 - 1) Y'[X] == CC, Y[X], X], 1]
({{Y[X] -> C[2] +
Inactive[Integrate][(E^-K[1]^3 C[1] K[1] +
CC E^-K[1]^3 (-E^K[1]^3 + Gamma[2/3, -K[1]^3] (-K[1]^3)^(1/3))), {K[1], 1, X}]}}
)
(Replaced the protect system symbol C by CC.)
Update: Michael Seifert's answer can be obtained from the above using FullSimplify:
FullSimplify[%]
(*
{{Y[X] -> C[2] +
Inactive[Integrate][(-CC +
E^-K[1]^3 K[1] (C[1] - CC ExpIntegralE[1/3, -K[1]^3] K[1]^2)), {K[1], 1, X}]}}
*)
Mathematica can solve the ODE partway, but the answer isn't all that nice. Under the substitution $w(x) = y'(x)$, we have $x w' + (3 x^3 - 1) w = C$, which Mathematica can solve:
DSolve[x w'[x] + (3 x^3 - 1) w[x] == c, w[x], x]
(* {{w[x] -> E^-x^3 x C[1] + c E^-x^3 (-E^x^3 + (-x^3)^(1/3) Gamma[2/3, -x^3])}} *)
soln = FullSimplify[%]
(* {{w[x] -> -c + E^-x^3 (x C[1] - c x^3 ExpIntegralE[1/3, -x^3])}} *)
However, to get a full solution for $y(x)$ out of this, MM would have to integrate this function, which it (understandably) can't do:
Integrate[w[x] /. First[soln], x]
(* [Integral](-c + E^-x^3 (x C[1] - c x^3 ExpIntegralE[1/3, -x^3])) [DifferentialD]x *)