--Copyright The Numerical Algorithms Group Limited 1994.
-------------------------- nlode.input --------------------------------
)cl all
-- this will be the unknown
y := operator y

-- some non-linear non-exact 1st order equations

deq := (sin y x - x / y(x)) * differentiate(y x, x) = 1
-- the result with no initial condition is a first integral
-- when equated to any constant
solve(deq, y, x)

deq := differentiate(y x, x) = y(x) / (x + y(x) * log y x)
solve(deq, y, x)
-- same with initial condition y(1) = 1
-- the result is a first integral if equated to 0
solve(deq, y, x = 1, [1])

deq := (exp(- 2 * y x) - 2 * x * y x) * differentiate(y x, x) = y x
solve(deq, y, x)

-- this one has an independent parameter w, initial condition y(0) = 0
deq := differentiate(y x, x) = w + y(x) / (1 - y x)
solve(deq, y, x = 0, [0])

-- Bernoulli equation: the result is a first integral when equated to
-- any constant, but it can be explicitly solved for y(x)
deq := x**2 * differentiate(y x, x) + 2 * x * y x - y(x)**3
solve(deq, y, x)

-- Riccati equation: the result is a first integral when equated to
-- any constant, but it can be explicitly solved for y(x)
deq := differentiate(y x,x) = 1 + x**2 - 2 * x * y x + y(x)**2
solve(deq, y, x)

-- Riccati equation: the result is a first integral when equated to
-- any constant, but it can be explicitly solved for y(x)
deq := x**2 * differentiate(y x,x) = -1 - x * y x + x**2 * y(x)**2
solve(deq, y, x)


