2.3 Linear Equations

2.3 Linear

Linear Equation: (Subscript[a, 1])(x)(dy/dx)+(Subscript[a, 0])(x) y = g(x)

Normal Form: (dy/dx)+P(x) y = f(x)

Solution for f=0 is (e^(-∫P(x)dx))

Multiply eq through by  (e^(∫P(x)dx))

Collect Terms

(d/dx)(y[x]  (e^(∫P(x)dx)))= f[x] (e^(∫P(x)dx))

Integrate and deal with constants

Examples

Ex1:

t y'[t]+ t(t+2) y[t] == t (E^(-(t^2)/2))

Normal form 
    y'[t]+ (t+2) y[t] == (E^(-(t^2)/2))
 So
    P[t] ==t+2
So the integrating factor is
   (E^(∫P(t)dt))==(E^(1/2(t^2)+2t))
So the equation becomes
   (d/dt)[y[t](E^(∫P(t)dt))]==(E^(1/2(t^2)+2t))  (E^(-(t^2)/2))=(E^(2 t))

DSolve[
t y'[t]+ t(t+2) y[t] == t (E^(-(t^2)/2)),
y[t],
t]

Ex2:

Cos[x] y'[x] + Sin[x]y[x]==Sin[x],

Normal Form
	y'[x]+((Sin[x])/(Cos[x]))y[x]=((Sin[x])/(Cos[x]))
I.F.
	(E^(∫((Sin[x])/(Cos[x]))dx))=(E^(-Log[Cos[x]]))=(1/(Cos[x]))
So
	(d/dx)(((y[x])/(Cos[x])))=((Sin[x])/((Cos[x])^2))
and
	((y[x])/(Cos[x]))=(1/(Cos[x]))+c

DSolve[
Cos[x] y'[x] + Sin[x]y[x]==Sin[x],
y[x],
x]

Ex3:

x y'[x] + 4y[x]==x
with y[1]=2

DSolve[{
x y'[x]+4 y[x]==x,
y[1]==2},
y[x],
x]