Skip to main content
added 66 characters in body
Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374

Mathematica can do it, if you move the term $2 f(x)$ to the RHS !

Clear["Global`*"]
ode = f[x]*(x^2*g''[x] - 2*g[x] + 2) + x*(x*g'[x] - 2*g[x])*f'[x] == 0
lhs = ode[[1]] - 2*f[x]
rhs = ode[[2]] + 2*f[x] 

(*make it first order ODE*)
newOde = ApplySides[Integrate[#, x] &, lhs == rhs];

Mathematica graphics

(*Now it can solve it*)
DSolve[newOde, g[x], x]

Mathematica graphics

Mathematica should have been able to do it. btw, I do not see an a and b in your ode.

Mathematica can do it, if you move the term $2 f(x)$ to the RHS !

Clear["Global`*"]
ode = f[x]*(x^2*g''[x] - 2*g[x] + 2) + x*(x*g'[x] - 2*g[x])*f'[x] == 0
lhs = ode[[1]] - 2*f[x]
rhs = ode[[2]] + 2*f[x]
newOde = ApplySides[Integrate[#, x] &, lhs == rhs];
DSolve[newOde, g[x], x]

Mathematica graphics

Mathematica should have been able to do it. btw, I do not see an a and b in your ode.

Mathematica can do it, if you move the term $2 f(x)$ to the RHS !

Clear["Global`*"]
ode = f[x]*(x^2*g''[x] - 2*g[x] + 2) + x*(x*g'[x] - 2*g[x])*f'[x] == 0
lhs = ode[[1]] - 2*f[x]
rhs = ode[[2]] + 2*f[x] 

(*make it first order ODE*)
newOde = ApplySides[Integrate[#, x] &, lhs == rhs];

Mathematica graphics

(*Now it can solve it*)
DSolve[newOde, g[x], x]

Mathematica graphics

Mathematica should have been able to do it. btw, I do not see an a and b in your ode.

Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374

Mathematica can do it, if you move the term $2 f(x)$ to the RHS !

Clear["Global`*"]
ode = f[x]*(x^2*g''[x] - 2*g[x] + 2) + x*(x*g'[x] - 2*g[x])*f'[x] == 0
lhs = ode[[1]] - 2*f[x]
rhs = ode[[2]] + 2*f[x]
newOde = ApplySides[Integrate[#, x] &, lhs == rhs];
DSolve[newOde, g[x], x]

Mathematica graphics

Mathematica should have been able to do it. btw, I do not see an a and b in your ode.