||'''Book'''|| Advanced Engineering Mathematics || ||'''Author'''|| Erwin Kreyszig || ||'''Edition'''|| 8th Edition || /* code_begins */ {{{ t = var('t') # define a variable t L,R,I_0 = var('L R I_0') I = function('I',t) # define I to be a function of that variable # L, R, I_0 are constants DE = L*diff(I,t) + R*I == 0 print 'Differential Equation:' show(DE) soln = desolve(DE, [I,t]) print 'Solution:' show(soln) c = solve(soln.subs(t=0)==I_0, soln.variables()[2]) show(c) print 'Explicit solution:' soln.subs(c=c[0].rhs()) }}} /* code_ends */ * '''Solution by''': * Pankaj Pandey, Student, IIT Bombay