2.5 Euler-Cauchy Equations

Solve the Equation: (x^2)y’’ + axy’ + by = 0

eqn=x^2 y''[x]+a x  y'[x]+b y[x]==0

a=1.5; b=-0.5;

eqn

DSolve[eqn,y[x],x]

a=-5; b=9;

eqn

DSolve[eqn,y[x],x]

Factor[%]

This can be written as: (C1 + C2 ln x) (x^3)

a=0.6; b=16.04;

eqn

DSolve[eqn,y[x],x]

Factor[%]

sol=DSolve[eqn,y,x]

sol

Now, obtain a particular solution with C1 = 0 and C2 = 1, and plot the resulting solution y = (x^0.2) cos(4 ln x)

f[x_]:=y[x] /.sol /. {C[1] ->0, C[2] ->1}

Plot[f[x],{x,0,3},PlotRange->{{0,3},{-2,2}}]

Now, obtain a particular solution with C1 = 1 and C2 = 0, and plot the resulting solution y = (x^0.2) sin(4 ln x)

g[x_]:=y[x] /.sol /. {C[1] ->1, C[2] ->0}

Plot[g[x],{x,0,3},PlotRange->{{0,3},{-2,2}}]

Schrodinger Equation:
 -((♄^2)/2m) ψ”(x) + V(x) ψ(x) = E ψ(x)

Particle in a one-dimensional box: V = 0 ( 0 ⩽ x ⩽ L)

eqn=(-♄^2 / (2m))ψ''[x]==En ψ[x]

DSolve[eqn,ψ[x],x]

sol=DSolve[{eqn,ψ[0]==0},ψ,x]

eqnE = ψ[L]==0 /. sol

psi[x_]:=Sin [n Pi x / L]

n=1

Integrate[psi[x]^2,{x,0,L}]

L=1

Plot[psi[x],{x,0,L}]

n=2

Plot[psi[x],{x,0,L}]

n = 3

Plot[psi[x],{x,0,L}]