# I need help deriving a formula for a differential equation

So this one might be really basic or really hard and I don't know which one it is. The question reads:

Derive a formula for solutions of $\dfrac{dy}{dx}=ax+by+c$. Assume $a, b,$ and $c$ are constant.

I'm not sure how to do this problem but I've tried by making the equation $\dfrac{dy}{dx}-by=ax+c$ and since by is a constant then it becomes $\dfrac{dy}{dx}+by=ax+c$ which makes it first order linear and I solved it from there. Did I do it right or is there another way I should be going about doing this problem?

If we have $y'-by=ax+c$, this can be solved with the solution $y=y_c+y_p$ where $y_c$ solves the homogeneous part, so we have the characteritic equation:

$m-b=0\Rightarrow m=b\Rightarrow y_c(x)=Ae^{bx}$

and $y_p(x)=kx+l\Rightarrow y'_p(x)-by=k-b(kx+l)=ax+c\Rightarrow -kb=a,k-bl=c$

Thus: $k=-\frac{a}{b}, l=-\frac{a}{b^2}-c$ thus:

$y(x)=Ae^{bx}-\frac{a}{b}x-\frac{a}{b^2}-\frac{c}{b}$

• I don't think I've learned how to do that... Is it similar to undetermined coefficients for the first part? @ellya – a12b23c34 May 4 '14 at 16:27
• yes it is exactly that :) – Ellya May 4 '14 at 16:28
• @Panininini I've double checked on wolfram alpha, and my answer above is correct :) – Ellya May 4 '14 at 16:33
• Lol I got the same answer too. I forgot one step and that's why it looked a little off because I had 3 out of the 4 terms. Thanks! @ellya – a12b23c34 May 4 '14 at 18:07
• No worries, happy to help :) – Ellya May 4 '14 at 18:09

Steps to undertake:

1) Solve for $a=c=0$. Can you do it?

2) Use the method of constant variation to obtain the general formula.

• I'm not sure I understand. I don't know what constant variation is but I'm reading up on it right now. – a12b23c34 May 4 '14 at 16:20
• @Panininini try to apply it. If have troubles, ask here in comments. – TZakrevskiy May 4 '14 at 16:21