Here's the question you clicked on:
mathlilly
How do you solve x'+3x = t + e^-2t? Tried separation of variables, but didn't work
its a linear equation ie, of the form \[x'+p(t)x=q(t)\] so find an integrating factor \[\mu(t)=e^{∫p(t)dt}\] then \[\big(x\mu(t)\big)'=q(t)\mu(t)\]
Here we have a typical linear first-order ordinary differential equation. The idea is that we observe \((\mu x)'=\mu x'+\mu'x\), so if we can make our left-hand side (\(x'+3x\)) look like \(\mu x'+\mu'x\), then we can integrate both sides to yield \(\mu x\) and therefore \(x\). We can do this using multiplication, so essentially we need to find some \(\mu\) such that \(\mu x'+3\mu x=\mu x'+\mu' x\), i.e. \(3\mu=\mu'\); it should be clear then that \(\mu=e^{3t}\). Multiply throughout to yield \(\mu x'+3\mu x=\mu t+\mu e^{-2t}\), which is equivalent to \((\mu x)'=\mu t+\mu e^{-2t}\). Integrate both sides and solve for \(x\) to yield \(x=\frac1\mu\int(\mu t+\mu e^{-2t})dt\). Substitute in \(\mu=e^{3t}\) and simplify.
Thank you guys so much.
Generally you can solve a linear first-order ODE of the form \(y'+Px=Q\) where \(P,Q\) are functions of \(x\) as follows: \(y=\frac1\mu\int\mu Q\ dx\) where \(\mu=e^{\int P\ dx}\)
Oops, I meant \(y'+Py=Q\)