This is a first order linear differential equation. It fits into the general form of
(dy/dy) + p(x)*y = q(x)
Where in this case, p(x) = 4, and q(x) = -9x^3 - 5x-2
To solve this problem, you want to use an integrating factor. This is some function by which you can multiply the function to turn it into a separable equation. The choice for the integrating factor is usually
u(x) = exp(∫p(x) dx), where exp denotes 'e to the power of'
here, since p(x) = 4, the integral inside the exponent is fairly simple
u(x) = exp(∫4 dx) = exp(4x) (the constant of integration does not matter, since we only need to chose one function for the integrating factor that will work)
Multiply the differential equation by this u(x) to get
[(dy/dy) + 4*y]*exp(4x) = (-9x^3 - 5x-2)*exp(4x)
Distribute on the left hand side to get
(dy/dy)*exp(4x) + 4*y*exp(4x) = (-9x^3 - 5x-2)*exp(4x)
This is where the choice of the integrating factor is important. Now, the left hand side of the equation, looks like the result of a product rule derivative
(f(x)*g(x))' = f'(x)g(x) + f(x)g'(x)
where y = f(x)
and exp(4x) = g(x)
If you choose u(x) to be exp(∫p(x) dx), this will always be the case.
Now, you can group the terms of the left-hand side to essentially "undo the product rule"
(dy/dy)*exp(4x) + 4*y*exp(4x) = d/(dx) [y*exp(4x)]
If you want to verify that this works, try differentiating y*exp(4x) and notice that you get the LHS back
Now, the differential equation becomes
d/(dx) [y*exp(4x)] = (-9x^3 - 5x-2)*exp(4x)
All of the derivatives are grouped together, so this can essentially be solved right now by integrating both sides
∫d/(dx) [y*exp(4x)] dx = ∫(-9x^3 - 5x-2)*exp(4x) dx
=>
y*exp(4x) = ∫(-9x^3 - 5x-2)*exp(4x) dx
Carrying out the integral on the right is a bit cumbersome, as it requires using integration by parts multiple times. The process can be simplified by applying the method of Tabular Integration.
Diff Int
+ | -9x^3 - 5x-2 | exp(4x)
- | -27x^2 - 5 | (1/4)*exp(4x)
+ | -54x | (1/16)*exp(4x)
- | -54 | (1/64)*exp(4x)
+ | 0 | (1/256)*exp(4x)
The result of the integration is the sum of the product of the diagonals, using the sign indicated by the first column.
∫(-9x^3 - 5x-2)*exp(4x) dx
= (-9x^3 - 5x-2)*(1/4)*exp(4x) - (-27x^2 - 5 )*(1/16)*exp(4x) + (-54x)*(1/64)*exp(4x) - (-54 )*(1/256)*exp(4x)
= (-9x^3 - 5x-2)*(1/4)*exp(4x) + (27x^2 + 5 )*(1/16)*exp(4x) - (54x)*(1/64)*exp(4x) + (54 )*(1/256)*exp(4x)
= [(-9x^3 - 5x-2)*(1/4) + (27x^2 + 5 )*(1/16) - (54x)*(1/64) + (54 )*(1/256)]*exp(4x)
Distributing and combining like terms gives
∫(-9x^3 - 5x-2)*exp(4x) dx = (-288x^3 + 216x^2 - 268x + 3)*(1/128)*exp(4x) + C
Now, back to the differential equation, we have
y*exp(4x) = (-288x^3 + 216x^2 - 268x + 3)*(1/128)*exp(4x) + C
We can get the solution now by dividing both sides by exp(4x)
y = (-288x^3 + 216x^2 - 268x + 3)*(1/128) + C*exp(-4x)
This is the solution to the ODE. To find the solution with the initial value, we need to set y(0) = 0
0 = (-288*0^3 + 216*0^2 - 268*0 + 3)*(1/128) + C*exp(-4*0)
0 = (3/128) + C => C = -3/128
Finally, substituting in the value of C, we have the final answer
y = (-288x^3 + 216x^2 - 268x + 3)*(1/128) - (3/128)*exp(-4x)
Adam B.
09/16/21