Skip to main content
improved formatting
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

I have this differential equation:

eq=D[\[Psi][r]eq=D[ψ[r],r]+A*\[Psi][r]r]+A*ψ[r]-(B/(A*r))\[Psi][r]==0;ψ[r]==0;

And DSolveDSolve sucessfully solves it:

sol=DSolve[eqsol = DSolve[eq,\[Psi][r]ψ[r],r];

But when I check by replacing all, in this case it doesn't replace the derivative of the function:

Simplify[eq/.sol]

Derivative still must be replaced too. If I do:

Simplify[eq/.sol/.D[sol,r]]

Then this gives TrueTrue.

In other cases MathematicaMathematica replaced the function and its derivatives in one shot. What's happening in this case?

I have this differential equation:

eq=D[\[Psi][r],r]+A*\[Psi][r]-(B/(A*r))\[Psi][r]==0;

And DSolve sucessfully solves it:

sol=DSolve[eq,\[Psi][r],r];

But when I check by replacing all, in this case it doesn't replace the derivative of the function:

Simplify[eq/.sol]

Derivative still must be replaced too. If I do:

Simplify[eq/.sol/.D[sol,r]]

Then this gives True.

In other cases Mathematica replaced the function and its derivatives in one shot. What's happening in this case?

I have this differential equation:

eq=D[ψ[r],r]+A*ψ[r]-(B/(A*r))ψ[r]==0;

And DSolve sucessfully solves it:

sol = DSolve[eq,ψ[r],r];

But when I check by replacing all, in this case it doesn't replace the derivative of the function:

Simplify[eq/.sol]

Derivative still must be replaced too. If I do:

Simplify[eq/.sol/.D[sol,r]]

Then this gives True.

In other cases Mathematica replaced the function and its derivatives in one shot. What's happening in this case?

Source Link
Giovanni F.
  • 1.9k
  • 13
  • 20

Checking differential equation solution

I have this differential equation:

eq=D[\[Psi][r],r]+A*\[Psi][r]-(B/(A*r))\[Psi][r]==0;

And DSolve sucessfully solves it:

sol=DSolve[eq,\[Psi][r],r];

But when I check by replacing all, in this case it doesn't replace the derivative of the function:

Simplify[eq/.sol]

Derivative still must be replaced too. If I do:

Simplify[eq/.sol/.D[sol,r]]

Then this gives True.

In other cases Mathematica replaced the function and its derivatives in one shot. What's happening in this case?