#section 1.2 #6a # verify a solution to an ODE x=var('x') # defines variable y=x^2*(1+ln(x))# defines the equation expand (diff(y,x,2)-((3*x*diff(y,x)-4*y)/(x^2)))# left hand side of the equation # result equals zero , this is true
0
#section 1.3 #16 #Plotting a sequence of solution curves with a direction field for an ODE x,y=var('x,y') I=sum(plot(c*e^(x)+x^3+3*x^2+6*x+6,(x,-2,2)) for c in range (-5,10))#varies the constant c. D= plot_slope_field (y-x^3,(x,-2,2),(y,-100,100), headaxislength=3, headlength=3)#plots the direction field P= plot(e^(x)+x^3+3*x^2+6*x+6,(x,-2,2), color='yellow')#emphasizes a specific solution in yellow show (I+D+P)