find solution of ordinary differential equations with piecewise coefficients
The dsolve function solves differential equations with piecewise coefficients. It solves general first order linear, linear constant coefficient with piecewise perturbation, and Riccati equations. It can handle some cases where the differential equation is solved by integration or variation of parameters.
The solutions are found in terms of distribution theory and translated into a piecewise expression.
You can verify a solution by substituting the solution into the equation. However, if the differential equation has jump discontinuities, the verification must be done in terms of Heaviside functions because the derivative at a discontinuous point is undefined in the piecewise function.
The theory is based on the dissertation Martin von Mohrenschildt. "Symbolic Solutions of Discontinuous Differential Equations." Swiss Federal Institute of Technology ETHZ No. 10768
Linear with discontinuous perturbation:
ode := diff(y(x),x$2) + y(x) = piecewise(x<0,-1,x<1,1,x<2,sin(x));
sol := dsolve(ode);
Solutions can also be tested by using odetest.
ode := diff(y(x),x)=convert(-signum(x)*abs(1-abs(x)),piecewise)*y(x)^2;
Download Help Document
What kind of issue would you like to report? (Optional)