IV. Differential equations and advanced analysis

36. Differential equations

The app solves first-order ordinary differential equations: separable, linear, exact, homogeneous (y′ = f(y/x)), Bernoulli equations and equations y′ = f(ax + by + c). It recognizes the type itself and shows the steps as taught at school – separating the variables, variation of the constant or an integrating factor, a substitution, the potential of an exact equation. The integrals in the steps have steps of their own. It checks the solution: the solution and its derivative are substituted into the equation and both sides edited to the same form.

Higher orders: linear equations with constant coefficients of any order by the characteristic equation (multiple and complex roots too), a particular solution by the special right side (resonance and a sum of right sides too) or by variation of constants, an initial value problem at zero by the Laplace transform too (the "Method" chip). Further Euler's equation by x = eᵗ, y⁽ⁿ⁾ = f(x) by repeated integration and the reduction of order – when y is missing (p = y′) or x is (y′ = p(y)).

The equation y′ = y·(a(x)·ln y + b(x)) becomes linear by the substitution z = ln y. A linear second-order equation with variable coefficients is solved when one solution can be guessed (xᵏ, eᶜˣ, …): the second one by reducing the order (d'Alembert), the right side by variation of constants. The order is reduced by more than one too (p = y⁽ᵐ⁾ with a second-order equation for p). With parameters the cases are told apart – a damped oscillator by the sign of δ² − ω² (overdamped, critical, underdamped), a resonance (y″ + ω²y = cos 2t for ω = 2) and the sign of a constant the integral depends on (y″ = 2yy′). The Laplace transform also solves an initial value problem at a point other than 0 (by the shift τ = t − t₀) and with parameters.

A Riccati equation y′ = P(x)·y² + Q(x)·y + R(x) is solved when one particular solution y₁ is known: given on the next line (y1 = 1/x), or guessed of a simple form (a constant, ax, a/x, ax², ae^{±x}, x + a). The substitution y = y₁ + 1/z then makes it linear. Equations not linear in y′: Clairaut's y = x·y′ + ψ(y′) – the lines y = Cx + ψ(C) and the singular solution (their envelope) – and Lagrange's y = x·φ(y′) + ψ(y′) with a parametric solution (the parameter p = y′).

The result is the general solution with a constant C, for higher orders with constants C₁, C₂, … (explicitly, or implicitly where it can't be explicit); with conditions, the solution that satisfies them – initial and boundary ones, including "no solution" and "infinitely many solutions". Constant solutions lost by dividing are found too. Every solution is checked by substituting it into the equation. For the first order the graph shows the direction field and solutions for different C, for higher orders solutions for different constants; for an autonomous second-order equation (no x) a switch shows the phase plane (y, y′) too. Under the graph you can enter your own values of the constants and add their curve; the “Default curves” switch hides the ones the app chose. Tapping the graph draws the solution through that point – for a linear second-order equation you also set the tangent’s slope at the point with a slider.

A system of two linear equations with constant coefficients (x′ = 2x + y, y′ = x + 2y, dx/dt too) by the matrix’s eigenvalues and eigenvectors – real, complex and double – with the initial conditions x(0), y(0). The stationary point [0; 0] is classified (node, saddle, focus, center), the phase plane shown.

The oscillation of a second-order linear equation (every solution has infinitely many zeros) is studied by oscillation(y'' + x y = 0), also for an equation in the self-adjoint form (x y')' + y/x = 0 or with y′ (the app brings it to this form). The steps: exactly for a constant q and Euler's equation y″ + (k/x²)y = 0 with the boundary k = 1/4, the Leighton–Wintner and Kneser criteria (in the critical case also the comparison with the Riemann–Weber equation), the Riccati substitution w = r y′/y, the Prüfer transformation and the numerical count of zeros on an interval (give it after a semicolon: ; ⟨1; 50⟩) with Sturm's estimate of their distance. A half-linear equation (|y'| y')' + q |y| y = 0 (in general the exponent |y'|^(p−2)) is judged by the critical constant ((p − 1)/p)^p, the discrete counterpart Δ^2 y_n + q_n y_{n+1} = 0 (also Δ(r_n Δy_n)) by its generalized zeros. The graph shows the solution with its zeros and Prüfer's angle φ.

The asymptotics of solutions of a nonlinear equation with the p-Laplacian (a(x)|y′|^α sgn y′)′ = b(x)|y|^β sgn y with positive a, b is studied by the command asymptotics((e^(-3x) (y')^3)' = x^(-2) e^(-3x) y^3) (also asymptotika(...) in Czech); |y'|^k y' and |y|^k y can also be written with sgn, as an odd power (y')³, y³, and for α = 1 as (a y')' or y''. The solutions are divided into the classes M⁺ (|y| grows) and M⁻ (|y| decreases) by the limits of y and of the quasiderivative y^[1] = a|y′|^α sgn y′. For a half-linear equation (β = α) the app computes the integrals J₁, J₂, Y₁, Y₂ (by Symja, otherwise by comparing the power and logarithmic behaviour), determines one of the cases C1–C8 and the nonempty classes by Theorem 3.1 of Z. Došlá and M. Marini, Asymptotic Properties of Solutions to Half-Linear Differential Equation with Negative Potential (QUALITDE 2020), and shows the reciprocal equation. For an Emden–Fowler type equation with β ≠ α it uses the theorems of M. Cecchi, Z. Došlá, M. Marini, On the dynamics of the generalized Emden–Fowler equation (Georgian Mathematical Journal 7, 2000): the superlinear and sublinear case, strongly and weakly increasing and regularly decaying solutions. The graph shows numerical solutions of the nonempty classes (M⁻ by shooting) with their quasiderivatives below. Give the interval's start after a semicolon (; x ≥ 1). For an equation with negative q, oscillation offers the chip Asymptotics of solutions, and asymptotics the chip Oscillation of the equation.

How to enter it

y' = x*yThe derivative with a prime.
dy/dx = x y^2Leibniz's notation – it names the variable too (dm/dt, dT/dt).
\frac{dy}{dx} = \frac{y}{x} + xNotation from a photo.
(2xy + 6x)dx + (x^2 + 4y^3)dy = 0The form M dx + N dy = 0 (an exact equation).
y' = y^2 + 1, y(0) = 1An initial condition after a comma or on the next line.
dm/dt = m + 2, m(0) = 0The function and the variable can be any letters.
y' = y^2 - 2/x^2; y1 = 1/xA known particular solution of a Riccati equation on the next line (or after a semicolon).
y'' - 3y' + 2y = 3e^(2x)A higher-order equation – the derivatives with more primes.
y^{(4)} + 2y'' + y = 0Higher derivatives as y^{(4)} (from a photo too).
y'' + y = 0, y(0) = 1, y'(0) = 2Initial conditions y(0), y′(0) – or boundary ones at different points.
\ddot{x} + \omega^2 x = 0Newton's dots (derivatives by time t) and Greek parameters.
x' = 2x + y, y' = x + 2yA system of two linear equations – after a comma or on lines, with the conditions x(0) = …, y(0) = ….
oscillation(y'' + q(x) y = 0; ⟨a; b⟩)Oscillation of a second-order equation, optionally with an interval for the zeros.
oscillation((|y'| y')' + q(x) |y| y = 0)A half-linear equation (here p = 3).
oscillation(Δ^2 y_n + q_n y_{n+1} = 0)The discrete counterpart – a second-order linear recurrence.
asymptotics((a(x) |y'|^(α-1) y')' = b(x) |y|^(β-1) y; x ≥ x₀)Asymptotics of solutions of an equation with the p-Laplacian, optionally with the interval's start.

Examples

A separable equation – the general solution and the direction field.
Input: y' = x*y
y' = x*y
y' = x*yy' = x*y
The initial condition determines the constant C.
Input: y' = y^2 + 1, y(0) = 1
y' = y^2 + 1, y(0) = 1
y' = y^2 + 1, y(0) = 1y' = y^2 + 1, y(0) = 1
A linear equation by variation of the constant.
Input: y' + 2y = e^x Variation of the constant
y' + 2y = e^x
y' + 2y = e^xy' + 2y = e^x
The same equation by an integrating factor.
Input: y' + 2y = e^x Integrating factor
y' + 2y = e^x
y' + 2y = e^xy' + 2y = e^x
A homogeneous equation – the substitution u = y/x.
Input: y' = (x - y)/(x + y)
y' = (x - y)/(x + y)
y' = (x - y)/(x + y)y' = (x - y)/(x + y)
A Bernoulli equation – the substitution z = y^(1−n) and the constant solution y = 0.
Input: xy' - y = -xy^2
xy' - y = -xy^2
xy' - y = -xy^2xy' - y = -xy^2
An exact equation – the potential F(x, y) = C.
Input: (2xy + 6x)dx + (x^2 + 4y^3)dy = 0
(2xy + 6x)dx + (x^2 + 4y^3)dy = 0
(2xy + 6x)dx + (x^2 + 4y^3)dy = 0(2xy + 6x)dx + (x^2 + 4y^3)dy = 0
The substitution z = x − y; Symja would lose a factor 2 here, the app checks the result.
Input: y' = cos(x - y), y(0) = pi/2
y' = cos(x - y), y(0) = pi/2
y' = cos(x - y), y(0) = pi/2y' = cos(x - y), y(0) = pi/2
A Riccati equation – the particular solution y₁ = −2/x guessed, the substitution y = y₁ + 1/z.
Input: y' = y^2 - 2/x^2
y' = y^2 - 2/x^2
y' = y^2 - 2/x^2y' = y^2 - 2/x^2
The same equation with the particular solution y₁ = 1/x given.
Input: y' = y^2 - 2/x^2
y1 = 1/x
y' = y^2 - 2/x^2
y1 = 1/x
y' = y^2 - 2/x^2
y1 = 1/xy' = y^2 - 2/x^2
y1 = 1/x
A Clairaut equation – the lines y = Cx + C² and their envelope y = −x²/4.
Input: y = xy' + y'^2
y = xy' + y'^2
y = xy' + y'^2y = xy' + y'^2
Through the point [2; −1] on the envelope passes a single line y = 1 − x – and the envelope itself.
Input: y = xy' + y'^2, y(2) = -1
y = xy' + y'^2, y(2) = -1
y = xy' + y'^2, y(2) = -1y = xy' + y'^2, y(2) = -1
A Lagrange equation – the solution parametrically and the line y = 0.
Input: y = 2xy' + y'^2
y = 2xy' + y'^2
y = 2xy' + y'^2y = 2xy' + y'^2
The characteristic equation with complex roots −2 ± 3i.
Input: y'' + 4y' + 13y = 0
y'' + 4y' + 13y = 0
y'' + 4y' + 13y = 0y'' + 4y' + 13y = 0
A special right side with resonance – 2 is a root of the characteristic equation.
Input: y'' - 3y' + 2y = 3e^(2x) Special right side
y'' - 3y' + 2y = 3e^(2x)
y'' - 3y' + 2y = 3e^(2x)y'' - 3y' + 2y = 3e^(2x)
The right side tan x isn't special – variation of constants and the Wronskian.
Input: y'' + y = tan x
y'' + y = tan x
y'' + y = tan xy'' + y = tan x
Integrals of the variation of constants that can’t be expressed by elementary functions – a solution with an integral.
Input: y'' + y' + y = tan x
y'' + y' + y = tan x
y'' + y' + y = tan xy'' + y' + y = tan x
An initial value problem – a system for the constants C₁, C₂.
Input: y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0
y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0
y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0
The same problem by the Laplace transform.
Input: y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0 Laplace transform
y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0
y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0y'' - 4y' + 3y = e^(2x), y(0) = 1, y'(0) = 0
A boundary value problem with infinitely many solutions.
Input: y'' + y = 0, y(0) = 0, y(pi) = 0
y'' + y = 0, y(0) = 0, y(pi) = 0
Euler's equation – the substitution x = eᵗ.
Input: x^2y'' - 2xy' + 2y = x^2 + 2
x^2y'' - 2xy' + 2y = x^2 + 2
x^2y'' - 2xy' + 2y = x^2 + 2x^2y'' - 2xy' + 2y = x^2 + 2
The reduction y′ = p(y), the constants from the initial conditions step by step.
Input: y'' = e^(2y), y(0) = 0, y'(0) = 1
y'' = e^(2y), y(0) = 0, y'(0) = 1
y'' = e^(2y), y(0) = 0, y'(0) = 1y'' = e^(2y), y(0) = 0, y'(0) = 1
A damped oscillator – three cases by δ and ω.
Input: y'' + 2δy' + ω^2y = 0
y'' + 2δy' + ω^2y = 0
Resonance – for ω = 2 the solution has a different form.
Input: y'' + ω^2y = cos(2t)
y'' + ω^2y = cos(2t)
y'' + ω^2y = cos(2t)y'' + ω^2y = cos(2t)
A guessed solution y₁ = x and reduction of order (d'Alembert).
Input: (1-x^2)y'' - 2xy' + 2y = 0
(1-x^2)y'' - 2xy' + 2y = 0
(1-x^2)y'' - 2xy' + 2y = 0(1-x^2)y'' - 2xy' + 2y = 0
A system – eigenvalues of opposite signs, a saddle.
Input: x' = x + 2y, y' = 3x + 2y
x' = x + 2y, y' = 3x + 2y
x' = x + 2y, y' = 3x + 2yx' = x + 2y, y' = 3x + 2y
Complex eigenvalues – an unstable focus.
Input: dx/dt = x - y, dy/dt = x + y
dx/dt = x - y, dy/dt = x + y
dx/dt = x - y, dy/dt = x + ydx/dt = x - y, dy/dt = x + y
A system with initial conditions – a center.
Input: x' = y
y' = -x
x(0) = 1
y(0) = 0
x' = y
y' = -x
x(0) = 1
y(0) = 0
x' = y
y' = -x
x(0) = 1
y(0) = 0x' = y
y' = -x
x(0) = 1
y(0) = 0
Airy's equation – the Leighton–Wintner criterion and 12 zeros.
Input: oscillation(y'' + x y = 0)
oscillation(y'' + x y = 0)
oscillation(y'' + x y = 0)oscillation(y'' + x y = 0)
Euler's equation at the boundary k = 1/4 – not oscillatory yet.
Input: oscillation(y'' + 1/(4x^2) y = 0)
oscillation(y'' + 1/(4x^2) y = 0)
oscillation(y'' + 1/(4x^2) y = 0)oscillation(y'' + 1/(4x^2) y = 0)
Kneser's criterion: x²q → 1 > 1/4, the zeros grow geometrically.
Input: oscillation(y'' + 1/(x^2 + 1) y = 0)
oscillation(y'' + 1/(x^2 + 1) y = 0)
oscillation(y'' + 1/(x^2 + 1) y = 0)oscillation(y'' + 1/(x^2 + 1) y = 0)
The half-linear Euler equation, k = 1 > (2/3)³.
Input: oscillation((|y'| y')' + 1/x^3 |y| y = 0)
oscillation((|y'| y')' + 1/x^3 |y| y = 0)
oscillation((|y'| y')' + 1/x^3 |y| y = 0)oscillation((|y'| y')' + 1/x^3 |y| y = 0)
The discrete Kneser criterion: n²q_n = 1/8 < 1/4.
Input: oscillation(Δ^2 y_n + 1/(8n^2) y_{n+1} = 0)
oscillation(Δ^2 y_n + 1/(8n^2) y_{n+1} = 0)
oscillation(Δ^2 y_n + 1/(8n^2) y_{n+1} = 0)oscillation(Δ^2 y_n + 1/(8n^2) y_{n+1} = 0)
Example 4.2 of Došlá and Marini – the case C5: regularly increasing and strongly decaying solutions.
Input: asymptotics((e^(-3x) (y')^3)' = x^(-2) e^(-3x) y^3)
asymptotics((e^(-3x) (y')^3)' = x^(-2) e^(-3x) y^3)
asymptotics((e^(-3x) (y')^3)' = x^(-2) e^(-3x) y^3)asymptotics((e^(-3x) (y')^3)' = x^(-2) e^(-3x) y^3)asymptotics((e^(-3x) (y')^3)' = x^(-2) e^(-3x) y^3)asymptotics((e^(-3x) (y')^3)' = x^(-2) e^(-3x) y^3)
The case C4 – bounded increasing solutions and a whole interval of decreasing ones.
Input: asymptotics((x^4 y')' = y/x^4)
asymptotics((x^4 y')' = y/x^4)
asymptotics((x^4 y')' = y/x^4)asymptotics((x^4 y')' = y/x^4)asymptotics((x^4 y')' = y/x^4)asymptotics((x^4 y')' = y/x^4)
A superlinear equation – M⁺ = ∅, M⁻ = M⁻₀,₀ (the solution √2/(x + √2)).
Input: asymptotics(y'' = y^3)
asymptotics(y'' = y^3)
asymptotics(y'' = y^3)asymptotics(y'' = y^3)asymptotics(y'' = y^3)asymptotics(y'' = y^3)

Known limitations