Message Boards Message Boards

Interpret a case discrimination in a differential equation solution?

GROUPS:

Hey Guys,

I have a question. I'm trying to solve a differential equation. I have a solution, but I can't work with it. Mathematica makes a case distinction, but I do not know how to interpret this? Anybody have an idea? What does the Mod mean? Thank you for your help.

My code

POSTED BY: Roy Glavanitz
Answer
22 days ago

The solution that you found is wrong, as it is discontinuous. We get a continuous solution if we give a bounded interval as domain forĀ t:

sol = With[{a = 1, b = 1, x0 = 1, v0 = 0}, 
   DSolveValue[{a*x''[t] + b*x'[t] == SquareWave[t], x[0] == x0, 
     x'[0] == v0},
    x, {t, 0, 5}]];
PiecewiseExpand[sol[t]]
Plot[sol[t], {t, 0, 5}]
POSTED BY: Gianluca Gorni
Answer
22 days ago

Group Abstract Group Abstract