||'''Book''' ||Advanced Engineering Mathematics || ||'''Author''' ||Erwin Kreyszig || ||'''Edition''' ||8th Edition || /* code_begins */ {{{ reset() x=var('x') #initialize variable y=function('y',x) #define the variables in the function.eg. y=f(x). DE=x*diff(y,x)-2*y #write the ODE S=desolve(DE,y,x) #use desolve() print S DE=diff(S, x)*x - 2*S #validate the solution #SAGE could possibly modify desolve() to accept as an argument from the user,a solution to the ODE and #return true or false(or 0 or 1) depending upon whether the solution satisfies the equation or not. #As you can see in the output desolve() evaluates the general solution but doesn't provide any facility to #test for a solution. print DE }}} /* code_ends */ * '''Solution by''': * Gaurav Luthra, Student,KIIT ,Gurgaon * Ankur Khurana, Student, ITM,Gurgaon