$SPAD/src/input nlode.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool nlode.output
)set message test on
)set message auto off
)clear all

———-

This will be the unknown — * —

--S 1 of 16
y := operator y
--R
--R
--R   (1)  y
--R                                                          Type: BasicOperator
--E 1

———-

Some non-linear non-exact 1st order equations — * —

--S 2 of 16
deq := (sin y x - x / y(x)) * differentiate(y x, x) = 1
--R
--R
--R                            ,
--R        (y(x)sin(y(x)) - x)y (x)
--R
--R   (2)  ------------------------= 1
--R                  y(x)
--R                                          Type: Equation(Expression(Integer))
--E 2

———-

The result with no initial condition is a first integral when equated to any constant — * —

--S 3 of 16
solve(deq, y, x)
--R
--R
--R   (3)  sin(y(x)) - y(x)cos(y(x)) - x y(x)
--R                                         Type: Union(Expression(Integer),...)
--E 3
--S 4 of 16
deq := differentiate(y x, x) = y(x) / (x + y(x) * log y x)
--R
--R
--R         ,            y(x)
--R   (4)  y (x)= -----------------
--R               y(x)log(y(x)) + x
--R                                          Type: Equation(Expression(Integer))
--E 4
--S 5 of 16
solve(deq, y, x)
--R
--R
--R                     2
--R        y(x)log(y(x))  - 2x
--R   (5)  -------------------
--R               2y(x)
--R                                         Type: Union(Expression(Integer),...)
--E 5

———-

Same with initial condition y(1) = 1 the result is a first integral if equated to 0 — * —

--S 6 of 16
solve(deq, y, x = 1, [1])
--R
--R
--R                     2
--R        y(x)log(y(x))  + 2y(x) - 2x
--R   (6)  ---------------------------
--R                   2y(x)
--R                                         Type: Union(Expression(Integer),...)
--E 6
--S 7 of 16
deq := (exp(- 2 * y x) - 2 * x * y x) * differentiate(y x, x) = y x
--R
--R
--R           - 2y(x)            ,

--R   (7)  (%e        - 2x y(x))y (x)= y(x)
--R
--R                                          Type: Equation(Expression(Integer))
--E 7
--S 8 of 16
solve(deq, y, x)
--R
--R
--R                        2y(x)
--R   (8)  log(y(x)) - x %e
--R                                         Type: Union(Expression(Integer),...)
--E 8

———-

This one has an independent parameter w, initial condition y(0) = 0 — * —

--S 9 of 16
deq := differentiate(y x, x) = w + y(x) / (1 - y x)
--R
--R
--R         ,     (w - 1)y(x) - w
--R   (9)  y (x)= ---------------
--R                   y(x) - 1
--R                                          Type: Equation(Expression(Integer))
--E 9
--S 10 of 16
solve(deq, y, x = 0, [0])
--R
--R
--R                                                             2
--R         log((w - 1)y(x) - w) - log(- w) + (w - 1)y(x) + (- w  + 2w - 1)x
--R   (10)  ----------------------------------------------------------------
--R                                     2
--R                                    w  - 2w + 1
--R                                         Type: Union(Expression(Integer),...)
--E 10

———-

Bernoulli equation: the result is a first integral when equated to any constant, but it can be explicitly solved for y(x)

— * —

--S 11 of 16
deq := x**2 * differentiate(y x, x) + 2 * x * y x - y(x)**3
--R
--R

--R          2 ,          3
--R   (11)  x y (x) - y(x)  + 2x y(x)
--R
--R                                                    Type: Expression(Integer)
--E 11
--S 12 of 16
solve(deq, y, x)
--R
--R
--R              5         2
--R         (- 3x  - 2)y(x)  + 5x
--R   (12)  ---------------------
--R                  5    2
--R                5x y(x)
--R                                         Type: Union(Expression(Integer),...)
--E 12

———-

Riccati equation: the result is a first integral when equated to any constant, but it can be explicitly solved for y(x)

— * —

--S 13 of 16
deq := differentiate(y x,x) = 1 + x**2 - 2 * x * y x + y(x)**2
--R
--R
--R          ,         2              2
--R   (13)  y (x)= y(x)  - 2x y(x) + x  + 1
--R
--R                                          Type: Equation(Expression(Integer))
--E 13
--S 14 of 16
solve(deq, y, x)
--R
--R
--R            - y(x) + x
--R   (14)  ---------------
--R                   2
--R         x y(x) - x  + 1
--R                                         Type: Union(Expression(Integer),...)
--E 14

———-

Riccati equation: the result is a first integral when equated to any constant, but it can be explicitly solved for y(x)

— * —

--S 15 of 16
deq := x**2 * differentiate(y x,x) = -1 - x * y x + x**2 * y(x)**2
--R
--R
--R          2 ,      2    2
--R   (15)  x y (x)= x y(x)  - x y(x) - 1
--R
--R                                          Type: Equation(Expression(Integer))
--E 15
--S 16 of 16
solve(deq, y, x)
--R
--R
--R               3              2
--R           (- x  - 8x)y(x) - x  + 8
--R   (16)  ----------------------------
--R             3                 2
--R         (18x  - 18x)y(x) + 18x  + 18
--R                                         Type: Union(Expression(Integer),...)
--E 16
)spool
)lisp (bye)

———-

References^{[1] nothing}

8