Resuelve $$y'+2y=6.$ $
Cuando hago $$y'=2(3-y)\implies\int\frac{\mathrm dy}{3-y}=2\int\mathrm dx\implies-\ln{|3-y|}=2x+c\implies3-y=ke^{-2x}\therefore y=\boxed{3-ke^{-2x}},\quad c,k\in\Bbb R.$$ It satisfies the ODE because $$2ke^{-2x}+6-2ke^{-2x}=6=6.$$ However, when I try another solution, namely first solve the homogeneous equation: $$y'+2y=0\implies\int\frac{\mathrm dy}y=-2\int\mathrm dx\implies\ln{|y|}=-2x+c\implies y=ke^{-2x},\quad c,k\in\Bbb R$$ then $ y_P = k (x) e ^ {- 2x}$, so then $ $y'_P=k'(x)e^{-2x}-2k(x)e^{-2x}\implies k'(x)e^{-2x}-2k(x)e^{-2x}+2k(x)e^{-2x}=6\implies k'(x)=6e^{2x}\implies k(x)=3e^{2x}\implies y_P=3e^{2x}e^{-2x}=3\therefore y=y_H+y_P=\boxed{3+ke^{-2x}},$$ where this solution also satisfies $ y '+ 2y = 6$, because $$-2ke^{-2x}+6+2ke^{-2x}=6=6.$$ My question is, how can we express both solutions with the same expression of $ y $ ? Me gustaría que ambas soluciones fueran idénticas, pero ¿cómo?
¡Gracias!