1.设dx/dt=p,则d²x/dt²=pdp/dx
∵d²x/dt²=-w²x
==>pdp/dx=-w²x
==>p²=-w²x²+C1² (C1是积分常数)
==>p=±√(C1²-w²x²)
==>dx/dt=±√(C1²-w²x²)
==>dx/√(C1²-w²x²)=±dt
==>(1/w)arcsin(wx/C1)=±t+C2 (C2是积分常数)
==>x=(C1/w)sin[w(C2±t)]
∴原方程的通解是x=(C1/w)sin[w(C2±t)] (C1,C2是积分常数)
2.设x=r*tant,则dx=r*sec²tdt,sint=x/√(x²+r²)
故∫dx/√(x²+r²)=∫r*sec²tdt/(r*sect)
=∫ costdt/cos²t
=∫ d(sint)/(1-sin²t)
=(1/2)∫ [1/(1+sint)+1/(1-sint)]d(sint)
=(1/2)ln│(1+sint)/(1-sint)│+C1 (C1是积分常数)
=ln│x+√(x²+r²)│-ln│r│+C1
=ln│x+√(x²+r²)│+C (C=C1-ln│r│.∵C1是积分常数,∴C也是积分常数).