linearequation = y'[t]-3*t*y[t]==1;

generalsolution = DSolve[linearequation, y[t],t]

particularsolution = DSolve[{linearequation, y[0]==4}, y,t]

linearequation/.particularsolution[[1]]

y[0]/.particularsolution[[1]]

particularsolution = DSolve[{linearequation, y[0]==a}, y,t]

Plot[Evaluate[Table[y[t]/.particularsolution[[1]]/.a-> i, {i,-2,2,0.6}]], {t,-1.8,1.8}, PlotRange -> {-4,4}]

linearsecondorderODE = x''[t] +5*x'[t] +6*x[t]==0;

generalsolution = DSolve[linearsecondorderODE, x,t]

particularsolution = DSolve[{linearsecondorderODE, x[0]==1, x'[0]==1}, x,t]

linearsecondorderODE/.particularsolution[[1]]//Simplify

x[0]/.particularsolution[[1]]

x'[0]/.particularsolution[[1]]

Plot[x[t]/.particularsolution, {t,-1/3,2}]

particularsolution = DSolve[{linearsecondorderODE, x[0]==1, x'[0]==x0}, x,t]

Show[GraphicsGrid[Partition[Table[Plot[Evaluate[x[t]/.particularsolution[[1]]/.x0-> i], {t,-1,3}, PlotStyle -> {Red}, PlotLabel -> StringJoin["x0= ", ToString[i]], Ticks -> None], {i,-4,1}], {3}], ImageSize -> 400]]

inhomogeneousequation = y''[x] +y[x]==E^x;

generalsolution = DSolve[inhomogeneousequation, y,x]

DSolve[{inhomogeneousequation, y[0]==1, y[1]==1/2}, y,x]

DSolve[{inhomogeneousequation, y[0]==1, y[Pi]==6}, y,x]

fourthorderODE = y''''[x] + 2*y''[x] +y[x] ==Cos[x];

sol=DSolve[{fourthorderODE, y[0]==1, y'[0]==6, y''[0]==3, y'''[0]==-1}, y,x]

{fourthorderODE, y[0], y'[0], y''[0], y'''[0]}/.sol//Simplify

DSolve[{fourthorderODE, y[0]==1, y'[0]==6}, y,x]

Clear[x,y,z,t]

linearsystem ={x'[t]==x[t]-4*y[t]+1, y'[t] == 4* x[t] + y[t], z'[t]==z[t]};

initialvalues ={x[0]==2, y[0]==-1, z[0]==1};

sol=DSolve[Join[linearsystem, initialvalues], {x,y,z},t]

{linearsystem, initialvalues}/.sol[[1]]//Simplify

Plot[Evaluate[{x[t], y[t], z[t]}/.sol], {t,-2,1}]

ParametricPlot3D[Evaluate[{x[t], y[t], z[t]}/.sol], {t,-7,-3}, PlotRange -> All]

LogisticEquation = y'[t]== r(1-(y[t]/K))*y[t];

DSolve[LogisticEquation, y,t]

DSolve[{LogisticEquation/.{r-> (1/2), K-> 4}, y[0]==1}, y,t]

sol=DSolve[{LogisticEquation, y[0]==a*K}, y,t]

{LogisticEquation, y[0]}/.sol[[1]]//Simplify

Plot[Evaluate[Table[y[t]/.sol[[1]]/.{K-> 4, a-> i, r-> (1/3)}, {i,2,1/10, -1/3}]], {t,0,8}, PlotRange -> All]

eqn =y''[x] -(1/2)*(y'[x]^2/y[x]) +1/(2*y[x])==0;

sol=DSolve[{eqn, y[0]==1, y'[0]==2}, y,x]

{eqn, y[0], y'[0]}/.sol[[1]]//Simplify

generalsolution=DSolve[{y''[x]/2==y[x]^3-y[x]},y[x],x]

(sol=DSolve[{y''[x]/2 == y[x]^3 - y[x], y[0] == 0, y'[Infinity] == 0}, y[x], x] )//Quiet

Plot[{y[x]/.sol[[2]],1}, {x, -2,2}, PlotRange -> All]

PiecewiseExpand[UnitStep[x]+Max[x,x^2]]

DSolve[y'[x]==UnitStep[x], y, x]

eqn={y'[x]==UnitStep[x], y[0]==1};

sol=DSolve[eqn, y, x]

Plot[y[x]/.sol, {x,-3,3}]

Simplify[eqn/.sol[[1]],x >0 || x <0]

sol=DSolve[ {y'[x] + Max[x,1] y[x] == 0, y[0]==1}, y[x], x ]

Plot[y[x]/.sol, {x,-3,3}]

FinalSol =DSolve[ {y'[t]==If[ t≤2, y[t], -y[t]/2] , y[0]==1}, y, t]

SolFromMinusInfinityToTwo=DSolve[{y'[t]==y[t],y[0]==1},y,t]

SolFromTwoToInfinity=DSolve[{y'[t]==-y[t]/2,y[2]==E^2},y,t]

eqn = {y''[t]+y[t]==Piecewise[{{-1,t<0},{1,t<1},{Sin[t],t<2}}],y[0]==1,y'[0]==1};

sol=DSolve[ eqn, y, t ]

eqn = {y''[x] -Clip[x]*y[x]==0,y[0]==0,y'[0]==-1};

DSolve[eqn, y,x]