Clear[p,x,c,n];M=6;
p[x_]=Sum[c[n]x^n,{n,0,M}];
D[p[x],{x,2}]-2x D[p[x],x]+p[x];
Take[CoefficientList[%,x],M-1];
Solve[%==0,Table[c[n],{n,2,M}]];
pp[x_]=p[x]/.%/.c[0]->0/.c[1]->1;
DSolve[{y''[x]-2x y'[x]+y[x]==0,y[0]==0,y'[0]==1},y[x],x];
yy[x_]=y[x]/.%;
g=Plot[{pp[x],yy[x]},{x,0,2},PlotStyle->Thick];
Show[g]

Clear[p,q]
p=Table[x^n,{n,0,2}]
q={p[[1]],0,0}
q[[2]]=α[0]*q[[1]]+p[[2]]
Solve[Integrate[q[[2]]*q[[1]],{x,0,1}]==0,α[0]]
q[[2]]=q[[2]]/.%
q[[3]]=α[0]*q[[1]]+α[1]*q[[2]]+p[[3]]
Solve[{Integrate[q[[3]]*q[[1]],{x,0,1}]==0,Integrate[q[[3]]*q[[2]],{x,0,1}]==0},{α[0],α[1]}]
q[[3]]=q[[3]]/.%;
Flatten[q]
Plot[Evaluate[q/Sqrt[Integrate[q^2,{x,0,1}]]],{x,0,1}]
Integrate[Outer[#1*#2&,q,q]//Flatten,{x,0,1}]

Clear[x,y,u]
subs=y[x]->u[x]/Sqrt[x]
eq=x ^2D[y[x],{x,2}]+x D[y[x],x]+(x^2-1/4 )y[x]==0/.subs/.
D[subs,x]/.D[subs,{x,2}]//FullSimplify
subs/.DSolve[eq,u[x],x]

bes0=Plot[BesselJ[0,x],{x,0,20},PlotStyle->Red];
bes1=Plot[BesselJ[1,x],{x,0,20},PlotStyle->Green];
b1=BesselJZero[1,1];
b2=BesselJZero[1,2];
crta1=ListLinePlot[{{b1,0},{b1,BesselJ[0,b1]}}];
crta2=Graphics[Line[{{b2,0},{b2,BesselJ[0,b2]}}]];
Show[bes0,bes1,crta1,crta2]

Clear[x,f];
t=Table[ChebyshevT[i,x],{i,0,5}];
l=Table[LegendreP[i,x],{i,0,5}];
f[x_]=1/2x^7-x^2+2;
ct=Integrate[t*f[x]/Sqrt[1-x^2],{x,-1,1}]/Integrate[t^2/Sqrt[1-x^2],{x,-1,1}];
cp=Integrate[l*f[x],{x,-1,1}]/Integrate[l^2,{x,-1,1}];
Plot[{f[x],ct.t,cp.l},{x,-1,1}]
Plot[{f[x]-ct.t,f[x]-cp.l},{x,-1,1},PlotStyle->Thick]

ψ[n_,x_]:=(HermiteH[n,x] E^(-(x^2/2)))/Sqrt[2^n n! Sqrt[π]]
Plot[ψ[10,x],{x,-10,10}]
ψ[10,x]//FullSimplify
FourierTransform[ψ[10,x],x,ω]//FullSimplify

Block[{n=20},Plot[{(E^-x^2 HermiteH[n,x]^2)/(2^n n! Sqrt[π]),Piecewise[{{1/(Sqrt[2 n+1-x^2] π),x^2<2 n+1}}]},{x,-Sqrt[3 n],Sqrt[3 n]},PlotPoints->200]]