0
|
953 Views
|
2 Replies
|
2 Total Likes
View groups...
Share

# Different results when solving a DE using symbolic and numerical methods

Posted 6 months ago
 I'm getting different results when solving a differential equation using symbolic and numerical methods. Attached is a notebook for the community to evaluate. Sincerely,Sinval Attachments:
2 Replies
Sort By:
Posted 6 months ago
 I didn't know about FunctionDiscontinuities. I liked this procedure. I am very grateful for the information Gianluca.
Posted 6 months ago
 The symbolic solution suffers from branch cut discontinuities. Here is a way to correct it: phiSymbolic[t_] = DSolveValue[{eqd, \[Phi][0] == 0, \[Phi]'[0] == \[Omega]}, \[Phi][t], t] /. {R -> 5, M -> 20, m -> 1, v -> 5, \[Omega] -> 1} FunctionDiscontinuities[phiSymbolic[t], t] jump = Limit[phiSymbolic[t], t -> Pi/2, Direction -> "FromAbove"] - Limit[phiSymbolic[t], t -> Pi/2, Direction -> "FromBelow"] phiSymbolicCorrected[t_] = phiSymbolic[t] - jump*Ceiling[(t - Pi/2)/(Pi)]; Plot[phiSymbolicCorrected[t], {t, -Pi, 50 \[Pi]}, Exclusions -> None] Compare the corrected symbolic solution on a much larger interval with the corresponding numerical solution.