# SECTION 1.2# Example 1phi := x^2-x^(-1);de := diff(y(x),x,x) - 2/x^2*y(x) = 0;subs(y(x)=phi,de);simplify(%);# Example 2phi := c1*exp(-x) + c2*exp(2*x);de := diff(y(x),x,x) - diff(y(x),x) - 2*y(x) = 0;subs(y(x)=phi,de);simplify(%);# Example 3phi := 'phi';eq := phi^2 - x^3 + 8 = 0;solve(eq,phi);phi := %[1];de := diff(y(x),x) = 3*x^2/(2*y(x));subs(y(x) = phi,de);simplify(%);# Example 4eq := x + y(x) + exp(x*y(x)) = 0;diff(eq,x);expand(%);# The above equation is easily seen to be equivalent to the original differential equation. # Example 5eq := 4*x^2 - y(x)^2 = C;diff(eq,x);with(plots):# Review syntax of contourplot:?contourplotcontourplot(lhs(eq),x=-2..2,y=-4..4,scaling=constrained,contours=[-4,-1,0,1,4]);#Example 6phi := sin(x) - cos(x);de := diff(y(x),x,x) + y(x) = 0;subs(y(x)=phi,de);simplify(%);subs(x=0,phi);simplify(%);phiprime := diff(phi,x);subs(x=0,phiprime);simplify(%);# Example 7phi := c1*exp(-x) + c2*exp(2*x);phiprime := diff(phi,x);subs(x=0,phi) = 2;ic1 := simplify(%); subs(x=0,phiprime) = -3;ic2 := simplify(%);solve({ic1,ic2},{c1,c2});subs(%,phi);# Example 8f := x^2 - x*y^3;diff(f,y);# Example 9f := 3*y^(2/3);diff(f,y);