Find the general solution of the differential equation. Dy / dx-3xy = X

Find the general solution of the differential equation. Dy / dx-3xy = X

Solution 1: dy / dx-3xy = x = = > dy / DX = x (3Y + 1)
==>dy/(3y+1)=xdx
==>Ln │ 3Y + 1 │ = 3x & # 178 / / 2 + ln │ 3C (C is the integral constant)
==>3y+1=3Ce^(3x²/2)
==>y=Ce^(3x²/2)-1/3
The general solution of the original differential equation is y = CE ^ (3x & # / 2) - 1 / 3 (C is an integral constant)
Solution 2: dy / dx-3xy = = 0 = = > dy / y = 3xdx
==>Ln │ y │ = 3x & # 178 / / 2 + ln │ C (C is an integral constant)
==>y=Ce^(3x²/2)
Based on the constant variation method, let the solution of the original equation be y = C (x) e ^ (3x & # 178 / 2) (C (x) denotes a function of x)
∵y'=C'(x)e^(3x²/2)+3xC(x)e^(3x²/2)
Substituting into the original equation, C '(x) e ^ (3x & # 178 / 2) + 3xc (x) e ^ (3x & # 178 / 2) - 3xc (x) e ^ (3x & # 178 / 2) = X
==>C'(x)e^(3x²/2)=x
==>C'(x)=xe^(-3x²/2)
∴C(x)=∫xe^(-3x²/2)dx
=(1/3)∫e^(-3x²/2)d(3x²/2)
=C-E ^ (- 3x & # / 2) / 3 (C is an integral constant)
==>y=C(x)e^(3x²/2)=(C-e^(-3x²/2)/3)e^(3x²/2)=Ce^(3x²/2)-1/3
So the general solution of the original differential equation is y = CE ^ (3x & # 178 / 2) - 1 / 3 (C is an integral constant)