1--Copyright The Numerical Algorithms Group Limited 1994.
2-------------------------- nlode.input --------------------------------
3)cl all
4-- this will be the unknown
5y := operator y
6
7-- some non-linear non-exact 1st order equations
8
9deq := (sin y x - x / y(x)) * differentiate(y x, x) = 1
10-- the result with no initial condition is a first integral
11-- when equated to any constant
12solve(deq, y, x)
13
14deq := differentiate(y x, x) = y(x) / (x + y(x) * log y x)
15solve(deq, y, x)
16-- same with initial condition y(1) = 1
17-- the result is a first integral if equated to 0
18solve(deq, y, x = 1, [1])
19
20deq := (exp(- 2 * y x) - 2 * x * y x) * differentiate(y x, x) = y x
21solve(deq, y, x)
22
23-- this one has an independent parameter w, initial condition y(0) = 0
24deq := differentiate(y x, x) = w + y(x) / (1 - y x)
25solve(deq, y, x = 0, [0])
26
27-- Bernoulli equation: the result is a first integral when equated to
28-- any constant, but it can be explicitly solved for y(x)
29deq := x^2 * differentiate(y x, x) + 2 * x * y x - y(x)^3
30solve(deq, y, x)
31
32-- Riccati equation: the result is a first integral when equated to
33-- any constant, but it can be explicitly solved for y(x)
34deq := differentiate(y x,x) = 1 + x^2 - 2 * x * y x + y(x)^2
35solve(deq, y, x)
36
37-- Riccati equation: the result is a first integral when equated to
38-- any constant, but it can be explicitly solved for y(x)
39deq := x^2 * differentiate(y x,x) = -1 - x * y x + x^2 * y(x)^2
40solve(deq, y, x)
41