login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

# Edit detail for Solving Differential Equations revision 1 of 1

 1 Editor: jv1 Time: 2008/05/09 04:50:13 GMT-7 Note:

changed:
-
Test 1: solve a simple nonlinear homogeneous differential equation

\begin{axiom}
y := operator y
deq1 := D(y(x),x) = 9 - y(x)^2
solve(deq1,y,x)
\end{axiom}

Test 2: solve a class of simple nonlinear homogeneous differential equations

\begin{axiom}
deq2a := D(y(x),x) = c - p*y(x)^2
xpr2b := solve(deq2a,y,x)
simplify(x-xpr2b)
\end{axiom}

Test 3: find general solutions for nonlinear homogeneous differential equations

\begin{axiom}
f := operator f
deq3 := D(y(x),x) = f(y(x))
solve(deq3,y,x)
\end{axiom}

Test 4: integration

\begin{axiom}
integrate(1/(1-x^2),x)
\end{axiom}

Test 5: check result

\begin{axiom}
xpr5 := (log(x+1)-log(x-1))/2
D(xpr5,x)
\end{axiom}

Test 6: check simplification

\begin{axiom}
xpr6 := log(1+2/(x-1))/2
D(xpr6,x)
\end{axiom}

Test 7: Express y(x) as function of x (replacing y(x) with z)

\begin{axiom}
eq7a := x = (log(z+1)-log(z-1))/2
solve(eq7a,z)
xpr7b := (1+exp(-2*z))/(1-exp(-2*z))
simplify(xpr7b)
\end{axiom}

Test 8: check simplified result

\begin{axiom}
xpr8 := (1+exp(-2*x))/(1-exp(-2*x)) - (1+2/(exp(2*x)-1))
simplify(xpr8)
\end{axiom}

Test 9: check result by substitution in the DEQ

\begin{axiom}
xpr9a := (1+2/(exp(2*x)-1))
xpr9b := D(xpr9a,x)
xpr9c := 1 - (xpr9a)^2
\end{axiom}

Test 10: finding the explicit solution for the deq in test 2

\begin{axiom}
wcp := sqrt(c*p)
xpr10a := log(((p*z^2+c)*wcp-2*c*p*z)/(p*z^2-c))/(2*wcp)
solve(x = xpr10a,z)
eq10c := (p*z^2+c)*wcp-2*c*p*z
solve(eq10c=0,z)
xpr10d := p*wcp*(z-wcp/p)^2
simplify(xpr10d/eq10c)
xpr10e := (wcp/p)*(2/(1-exp(-2*wcp*x)/wcp)-1)
xpr10f := D(xpr10e,x)
xpr10g := c - p*(xpr10e)^2
simplify(xpr10f / xpr10g)
\end{axiom}

Test 11: non-homogeneous generalization: c as linear function of x

\begin{axiom}
deq11a := D(y(x),x) = a*x + b - p*y(x)^2
solve(deq11a,y,x)
\end{axiom}

Test 12: non-homogeneous generalization: c as arbitrary function of x

\begin{axiom}
c := operator c
deq12a := D(y(x),x) = c(x) - p*y(x)^2
solve(deq12a,y,x)
\end{axiom}

Test 13: guessing solution for deq12a

\begin{axiom}
wpcx := sqrt(c(x))*sqrt(p)
xpr13a := log((p*wpcx*(z-wpcx/p)^2)/(p*z^2-c(x)))/(2*wpcx)
xpr13b := (wpcx/p)*(2/(1-exp(-2*wpcx*x)/wpcx)-1)
xpr13c := D(xpr13b,x)
xpr13d := c(x) - p*(xpr13b)^2
simplify(xpr13d / xpr13c)
xpr13e := simplify(D((2/(1-exp(-2*wpcx*x)/wpcx)-1),x))
xpr13f := (wpcx-exp(-2*wpcx*x))^2
xpr13g := simplify(((2*p*c(x)*x+wpcx)*D(c(x),x)+4*p*c(x)^2)/wpcx)
xpr13h := simplify((1+2*wpcx*x)*D(c(x),x)+4*wpcx*c(x))
simplify(xpr13h/xpr13g)
xpr13i := simplify((1/(wpcx-z)-1/(2*wpcx))*D(c(x),x) + ((1+2*wpcx*x)*D(c(x),x)+4*wpcx*c(x))*z/(wpcx-z)^2)
w := operator w
z := operator z
simplify(D((2/(1-z(x)/w(x))-1)*c(x)/w(x),x))
simplify((2*c(x)*w(x)^2*D(z(x),x)+(z(x)^2-2*w(x)*z(x)-w(x)^2)*c(x)*D(w(x),x)+(w(x)^3-w(x)*z(x)^2)*D(c(x),x))/(w(x)^2*(z(x)-w(x))^2))
xpr13j := simplify((2*c(x)*w(x)^2*w(x)*z(x)*(x/c(x)-1/2)+(z(x)^2-2*w(x)*z(x)-w(x)^2)*c(x)*(-w(x)/(2*c(x)))+(w(x)^3-w(x)*z(x)^2)*D(c(x),x))/(w(x)^2*(z(x)-w(x))^2))
xpr13k := simplify((1/(w(x)-z(x))-1/(2*w(x)))*D(c(x),x) + ((1+2*w(x)*x)*D(c(x),x) + 4*w(x)*c(x))*z(x)/(w(x)-z(x))^2)
simplify(xpr13k/xpr13j)
simplify(xpr13k-xpr13j)
\end{axiom}



Test 1: solve a simple nonlinear homogeneous differential equation

fricas
y := operator y
 (1)
Type: BasicOperator?
fricas
deq1 := D(y(x),x) = 9 - y(x)^2
 (2)
Type: Equation(Expression(Integer))
fricas
solve(deq1,y,x)
 (3)
Type: Union(Expression(Integer),...)

Test 2: solve a class of simple nonlinear homogeneous differential equations

fricas
deq2a := D(y(x),x) = c - p*y(x)^2
 (4)
Type: Equation(Expression(Integer))
fricas
xpr2b := solve(deq2a,y,x)
 (5)
Type: Union(Expression(Integer),...)
fricas
simplify(x-xpr2b)
 (6)
Type: Expression(Integer)

Test 3: find general solutions for nonlinear homogeneous differential equations

fricas
f := operator f
 (7)
Type: BasicOperator?
fricas
deq3 := D(y(x),x) = f(y(x))
 (8)
Type: Equation(Expression(Integer))
fricas
solve(deq3,y,x)
 (9)
Type: Union(Expression(Integer),...)

Test 4: integration

fricas
integrate(1/(1-x^2),x)
 (10)
Type: Union(Expression(Integer),...)

Test 5: check result

fricas
xpr5 := (log(x+1)-log(x-1))/2
 (11)
Type: Expression(Integer)
fricas
D(xpr5,x)
 (12)
Type: Expression(Integer)

Test 6: check simplification

fricas
xpr6 := log(1+2/(x-1))/2
 (13)
Type: Expression(Integer)
fricas
D(xpr6,x)
 (14)
Type: Expression(Integer)

Test 7: Express y(x) as function of x (replacing y(x) with z)

fricas
eq7a := x = (log(z+1)-log(z-1))/2
 (15)
Type: Equation(Expression(Integer))
fricas
solve(eq7a,z)
 (16)
Type: List(Equation(Expression(Integer)))
fricas
xpr7b := (1+exp(-2*z))/(1-exp(-2*z))
 (17)
Type: Expression(Integer)
fricas
simplify(xpr7b)
 (18)
Type: Expression(Integer)

Test 8: check simplified result

fricas
xpr8 := (1+exp(-2*x))/(1-exp(-2*x)) - (1+2/(exp(2*x)-1))
 (19)
Type: Expression(Integer)
fricas
simplify(xpr8)
 (20)
Type: Expression(Integer)

Test 9: check result by substitution in the DEQ

fricas
xpr9a := (1+2/(exp(2*x)-1))
 (21)
Type: Expression(Integer)
fricas
xpr9b := D(xpr9a,x)
 (22)
Type: Expression(Integer)
fricas
xpr9c := 1 - (xpr9a)^2
 (23)
Type: Expression(Integer)

Test 10: finding the explicit solution for the deq in test 2

fricas
wcp := sqrt(c*p)
 (24)
Type: Expression(Integer)
fricas
xpr10a := log(((p*z^2+c)*wcp-2*c*p*z)/(p*z^2-c))/(2*wcp)
 (25)
Type: Expression(Integer)
fricas
solve(x = xpr10a,z)
 (26)
Type: List(Equation(Expression(Integer)))
fricas
eq10c := (p*z^2+c)*wcp-2*c*p*z
 (27)
Type: Expression(Integer)
fricas
solve(eq10c=0,z)
 (28)
Type: List(Equation(Expression(Integer)))
fricas
xpr10d := p*wcp*(z-wcp/p)^2
 (29)
Type: Expression(Integer)
fricas
simplify(xpr10d/eq10c)
 (30)
Type: Expression(Integer)
fricas
xpr10e := (wcp/p)*(2/(1-exp(-2*wcp*x)/wcp)-1)
 (31)
Type: Expression(Integer)
fricas
xpr10f := D(xpr10e,x)
 (32)
Type: Expression(Integer)
fricas
xpr10g := c - p*(xpr10e)^2
 (33)
Type: Expression(Integer)
fricas
simplify(xpr10f / xpr10g)
 (34)
Type: Expression(Integer)

Test 11: non-homogeneous generalization: c as linear function of x

fricas
deq11a := D(y(x),x) = a*x + b - p*y(x)^2
 (35)
Type: Equation(Expression(Integer))
fricas
solve(deq11a,y,x)
 (36)
Type: Union("failed",...)

Test 12: non-homogeneous generalization: c as arbitrary function of x

fricas
c := operator c
 (37)
Type: BasicOperator?
fricas
deq12a := D(y(x),x) = c(x) - p*y(x)^2
 (38)
Type: Equation(Expression(Integer))
fricas
solve(deq12a,y,x)
 (39)
Type: Union("failed",...)

Test 13: guessing solution for deq12a

fricas
wpcx := sqrt(c(x))*sqrt(p)
 (40)
Type: Expression(Integer)
fricas
xpr13a := log((p*wpcx*(z-wpcx/p)^2)/(p*z^2-c(x)))/(2*wpcx)
 (41)
Type: Expression(Integer)
fricas
xpr13b := (wpcx/p)*(2/(1-exp(-2*wpcx*x)/wpcx)-1)
 (42)
Type: Expression(Integer)
fricas
xpr13c := D(xpr13b,x)
 (43)
Type: Expression(Integer)
fricas
xpr13d := c(x) - p*(xpr13b)^2
 (44)
Type: Expression(Integer)
fricas
simplify(xpr13d / xpr13c)
 (45)
Type: Expression(Integer)
fricas
xpr13e := simplify(D((2/(1-exp(-2*wpcx*x)/wpcx)-1),x))
 (46)
Type: Expression(Integer)
fricas
xpr13f := (wpcx-exp(-2*wpcx*x))^2
 (47)
Type: Expression(Integer)
fricas
xpr13g := simplify(((2*p*c(x)*x+wpcx)*D(c(x),x)+4*p*c(x)^2)/wpcx)
 (48)
Type: Expression(Integer)
fricas
xpr13h := simplify((1+2*wpcx*x)*D(c(x),x)+4*wpcx*c(x))
 (49)
Type: Expression(Integer)
fricas
simplify(xpr13h/xpr13g)
 (50)
Type: Expression(Integer)
fricas
xpr13i := simplify((1/(wpcx-z)-1/(2*wpcx))*D(c(x),x) + ((1+2*wpcx*x)*D(c(x),x)+4*wpcx*c(x))*z/(wpcx-z)^2)
 (51)
Type: Expression(Integer)
fricas
w := operator w
 (52)
Type: BasicOperator?
fricas
z := operator z
 (53)
Type: BasicOperator?
fricas
simplify(D((2/(1-z(x)/w(x))-1)*c(x)/w(x),x))
 (54)
Type: Expression(Integer)
fricas
simplify((2*c(x)*w(x)^2*D(z(x),x)+(z(x)^2-2*w(x)*z(x)-w(x)^2)*c(x)*D(w(x),x)+(w(x)^3-w(x)*z(x)^2)*D(c(x),x))/(w(x)^2*(z(x)-w(x))^2))
 (55)
Type: Expression(Integer)
fricas
xpr13j := simplify((2*c(x)*w(x)^2*w(x)*z(x)*(x/c(x)-1/2)+(z(x)^2-2*w(x)*z(x)-w(x)^2)*c(x)*(-w(x)/(2*c(x)))+(w(x)^3-w(x)*z(x)^2)*D(c(x),x))/(w(x)^2*(z(x)-w(x))^2))
 (56)
Type: Expression(Integer)
fricas
xpr13k := simplify((1/(w(x)-z(x))-1/(2*w(x)))*D(c(x),x) + ((1+2*w(x)*x)*D(c(x),x) + 4*w(x)*c(x))*z(x)/(w(x)-z(x))^2)
 (57)
Type: Expression(Integer)
fricas
simplify(xpr13k/xpr13j)
 (58)
Type: Expression(Integer)
fricas
simplify(xpr13k-xpr13j)
 (59)
Type: Expression(Integer)