f=1000;
ω=2 π f;
T=1/f;
Manipulate[
harm1=U1*Sin[ω t+ϕ1];
harm2=U2*Sin[2*ω t+ϕ2];
harm3=U3*Sin[3*ω t+ϕ3];
sign=harm1+harm2+harm3;
Column[{
Plot[sign,{t,0,2 T}],
Plot[harm1,{t,0,2 T}],
Plot[harm2,{t,0,2 T}],
Plot[harm3,{t,0,2 T}]

}]
,{U1,0,10},{ϕ1,-π/2,π/2},{U2,0,10},{ϕ2,-π/2,π/2},{U3,0,10},{ϕ3,-π/2,π/2}]

ClearAll[T]
n=5;
approx=(Subscript[a, 0])+(∑_(i=1)^n)((Subscript[b, i])*Sin[i*2*(Pi/T)*t]+(Subscript[a, i])*Cos[i*2*(Pi/T)*t])

(1/T)Integrate[approx,{t,0,T}]

(2/T)Integrate[approx*Sin[((6 π t)/T)],{t,0,T}]
(2/T)Integrate[approx*Cos[((4 π t)/T)],{t,0,T}]

T1=(10^(-3));
myFun=0.5+Tanh[100Sin[2*(Pi/T1)*t+0.4]];
Plot[myFun,{t,-T1,1.5T1},PlotStyle->Thick]

Off[NIntegrate::"ncvb",NIntegrate::"slwcon"]

a0=(1/T1)NIntegrate[myFun,{t,0,T1}];
b[i_]:=(2/T1)NIntegrate[myFun*Sin[i*2*(Pi/T1)*t],{t,0,T1}]
a[i_]:=(2/T1)NIntegrate[myFun*Cos[i*2*(Pi/T1)*t],{t,0,T1}]
nmax=50;
bcoeffs=Table[b[i],{i,nmax}];
acoeffs=Table[a[i],{i,nmax}];

bcoeffs

FourSer[n_]:=a0+(∑_(i=1)^n)(bcoeffs[[i]]*Sin[i*2*(Pi/T1)*t]+acoeffs[[i]]*Cos[i*2*(Pi/T1)*t]);

Manipulate[Plot[FourSer[n],{t,0,T1}],{n,1,nmax}]

ListPlot[bcoeffs,Filling->Axis,PlotRange->All,AxesLabel->{"harm. number","b"}]
ListPlot[acoeffs,Filling->Axis,PlotRange->All,AxesLabel->{"harm. number","a"}]

eqn=y''[t]+2*y'[t]+y[t]==u[t];
LaplaceTransform[eqn,t,s]
LaplEqn=%/.{LaplaceTransform[y[t],t,s]->Y[s],LaplaceTransform[u[t],t,s]->U[s]}

way=Y[s]/.Solve[LaplEqn,Y[s]][[1]]

TransFuncU[s]=(way/(U[s]))/.{y[0]->0,y'[0]->0}
TransFuncy[0]=Simplify[(way/(y[0]))/.{U[s]->0,y'[0]->0}]
TransFuncyDer[0]=Simplify[(way/(y'[0]))/.{U[s]->0,y[0]->0}]