File: ode.chapt.txt

package info (click to toggle)
yacas 1.3.6-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 7,176 kB
  • ctags: 3,520
  • sloc: cpp: 13,960; java: 12,602; sh: 11,401; makefile: 552; perl: 517; ansic: 381
file content (89 lines) | stat: -rw-r--r-- 2,037 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

			Differential Equations

*INTRO In this chapter, some facilities for solving differential
equations are described. Currently only simple equations without
auxiliary conditions are supported.

*CMD OdeSolve --- general ODE solver
*STD
*CALL
	OdeSolve(expr1==expr2)
*PARMS

{expr1,expr2} -- expressions containing a function to solve for

*DESC

This function currently can solve second order homogeneous linear real constant
coefficient equations. The solution is returned with unique constants
generated by {UniqueConstant}. The roots of the auxiliary equation are 
used as the arguments of exponentials. If the roots are complex conjugate
pairs, then the solution returned is in the form of exponentials, sines
and cosines.

First and second derivatives are entered as {y',y''}. Higher order derivatives
may be entered as {y(n)}, where {n} is any integer. 


*E.G.

	In> OdeSolve( y'' + y == 0 )
	Out> C42*Sin(x)+C43*Cos(x);
	In> OdeSolve( 2*y'' + 3*y' + 5*y == 0 )
	Out> Exp(((-3)*x)/4)*(C78*Sin(Sqrt(31/16)*x)+C79*Cos(Sqrt(31/16)*x));
	In> OdeSolve( y'' - 4*y == 0 )
	Out> C132*Exp((-2)*x)+C136*Exp(2*x);
	In> OdeSolve( y'' +2*y' + y == 0 )
	Out> (C183+C184*x)*Exp(-x);

*SEE Solve, RootsWithMultiples

*CMD OdeTest --- test the solution of an ODE
*STD
*CALL
	OdeTest(eqn,testsol)
*PARMS

{eqn} -- equation to test

{testsol} -- test solution

*DESC

This function automates the verification of the solution of an ODE.
It can also be used to quickly see how a particular equation operates
on a function.

*E.G.

	In> OdeTest(y''+y,Sin(x)+Cos(x))
	Out> 0;
	In> OdeTest(y''+2*y,Sin(x)+Cos(x))
	Out> Sin(x)+Cos(x);

*SEE OdeSolve

*CMD OdeOrder --- return order of an ODE
*STD
*CALL
	OdeOrder(eqn)
*PARMS

{eqn} -- equation 

*DESC

This function returns the order of the differential equation, which is
order of the highest derivative. If no derivatives appear, zero is returned.

*E.G.

	In> OdeOrder(y'' + 2*y' == 0)
	Out> 2;
	In> OdeOrder(Sin(x)*y(5) + 2*y' == 0)
	Out> 5;
	In> OdeOrder(2*y + Sin(y) == 0)
	Out> 0;

*SEE OdeSolve