Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Try this way

x = var('t')
y = function('y')(t)
y0= function('y0')(t)
desolve(diff(y,t,t) -diff(y,t)-6*y-4*t-1, y)

_K1*e^(3*t) + _K2*e^(-2*t) - 2/3*t - 1/18

A,B=var('A B')
def y0(t): return A*t+B

eq0=diff(y0(t),t,t) -diff(y0(t),t)-6*y0(t)-4*t-1; eq0

โˆ’6๐ด๐‘กโˆ’๐ดโˆ’6๐ตโˆ’4๐‘กโˆ’1

solve([eq0.coeff(t,0),eq0.coeff(t,1)],A,B)

{A:-2/3, B:-1/18}