MORE DSolve

WARMUP:  Find x[t] for eq ={ x’[t] ==a x[t] + b,x[0] ==  xzero} and plot it.

ClearAll["`*"]
eq ={ x'[t] ==a x[t] + b,x[0] ==  xzero}
sol = DSolve[eq,x[t],t]
x[t_] = x[t]/.sol[[1]]
a = 1; b = 3; xzero = 4;
x[t]
Plot[x[t],{t,0,1},PlotRange-> {0,All}]

Use NDSolve to find x[t]; plot it;    eq ={ x''[t] + 2  .01  x'[t] + ((x[t])^3)  == 7.5  Cos[t],x[0] == 0, x'[0] == 3}

Also, plot x’[t].

ClearAll["`*"]
eq ={ x''[t] + 2  .01  x'[t] + ((x[t])^3)  == 7.5  Cos[t],x[0] == 0, x'[0] == 3};

sol = NDSolve[eq,x[t],{t,0,30}];
x[t_] = x[t]/.sol[[1]]
Plot[x[t],{t,0,100},PlotRange->All]

Plot[x'[t],{t,0,100},PlotRange->All]

Solve numerically   {y’[t] == -a y[t], y[0] == 1}

ClearAll["`*"]
Manipulate[sol = NDSolve[{y'[t] == -a y[t], y[0] == 1},y[t],{t,0,4}];
Plot[y[t]/.sol,{t,0,4}],{a,.5,2}]

Solve Numerically;  Plot x’[t]:  { x''[t] + 2  γ  x'[t] + ((x[t])^3)  == 7.5  Cos[t],x[0] == 0, x'[0] == 3}

ClearAll["`*"]
γ = .045;
sol =Flatten[ NDSolve[{ x''[t] + 2  γ  x'[t] + ((x[t])^3)  == 7.5  Cos[t],x[0] == 0, x'[0] == 3},x[t],{t,0,30}]]
x[t_] = x[t]/.sol
diffy = D[x[t],t]
Plot[diffy,{t,0,30},PlotRange->All]

a = 1;
sol = NDSolve[{y'[t] == -a y[t], y[0] == 1},y[t],{t,0,4}]

D[sol,t]

deriv[t_] =y'[t]/. Flatten[D[sol,t]]

Plot[deriv[t],{t,0,1}]

Sometimes DSolve gives you a very strange output BUT you can still use it as a function
Solve:       eq ={ x’[t] ==x[t] + Sin[x[t]],x[0] ==  xzero}

ClearAll["`*"]
eq ={ x'[t] ==x[t] + Sin[x[t]],x[0] == xzero}
sol = DSolve[eq,x[t],t]

x[t_] = x[t]/.sol[[1]]

xzero = 1; 
Plot[x[t],{t, 0,4}]