# Calculator for general second order differential equations

The differential equation is given as follows:

ODE:  y′′ = f(x, y, y′)

with the initial values

y(x0) = y0   and   y′(x0) = y′0

## Numerical solution of the general 2.order differential equation

The solution of the general differential equation 2.order is calculated numerically. The method can be selected. Three Runge-Kutta methods are available: Heun, Euler and Runge-Kutta 4.Order. The initial values ​​for y0 and y′0 can be varied by pulling the dots in the charts. The value for x0 can be set in numeric input field right. In the function up to three parameters a, b and c can be used which can be varied by means of the slider in the upper graph. In state-space diagram the solutions y1 and y2 of the corresponding general first order differential equation system are applied. The diagram shows y2 over y1. The number of grid vectors in state-space diagram can be set in the numeric field for the grid points. In the state-space diagram is plotted y2 on the vertical axis and y1 about the horizontal axis.

Scale:
Steps:
Method:
ODE y:

Initial values

x0=
y0=
y′0=

Parameter values

a=
b=
c=

Axes ranges

x-min=
x-max=
y-min=
y-max=

Parameter ranges

a-min=
b-min=
c-min=

Parameter ranges

a-max=
b-max=
c-max=

### Solution in state space (phase space)

Grap the start point to move the initial values. The grid vectors show the initial direction if the ODE starts at this points.

Scale:
Grid points:
Scale=
Curve:
Grid vectors:

Axes ranges

y1-min=
y1-max=
y2-min=
y2-max=

f(x, y, ys) =

cl
ok
Pos1
End
7
8
9
/
x
y
y′
4
5
6
*
a
b
c
1
2
3
-
π
(
)
0
.
+
sin
cos
tan
ex
ln
xa
a/x
^
asin
acos
atan
x2
√x
ax
a/(x+b)
|x|
sinh
cosh

## Transformation

With a substitution the differential equation of second order can be transformed to a differential system of first order.

Substitution:

y1 = y

y2 = y′

So the resulting ODE system of 1.order is:

y1′ = y2

y2′ = f(x, y1, y2)

### Usable expressions in the definition of the function f(x, y, y′)

Constants

NameDescription
LN2Natural logarithm of 2
LN10Natural logarithm of 10
LOG2EBase 2 logarithm of EULER
LOG10EBase 10 logarithm of EULER
PIRatio of the circumference of a circle to its diameter
SQRT1_2Square root of 1/2
SQRT2Square root of 2

Trigonometric Functions

FunctionDescription
sin(x)sine of x
cos(x)Cosine of x
tan(x)Tangent of x
asin(x)arcsine
acos(x)arccosine of x
atan(x)arctangent of x
atan2(y, x)Returns the arctangent of the quotient of its arguments.
cosh(x)Hyperbolic cosine of x
sinh(x)Hyperbolic sine of x

Logarithm and Exponential

FunctionDescription
pow(b, e)e to the b
sqrt(x)Square root of x
exp(x)EULER to the x
log(x), ln(x)Natural logarithm
log(x, b)Logarithm to base b
log2(x), lb(x)Logarithm to base 2
log10(x), ld(x)Logarithm to base 10

More functions

FunctionDescription
ceil(x)Get smallest integer n with n > x.
abs(x)Absolute value of x
max(a, b, c, ...)Maximum value of all given values.
min(a, b, c, ...)Minimum value of all given values.
random(max = 1)Generate a random number between 0 and max.
round(v)Returns the value of a number rounded to the nearest integer.
floor(x)Returns the biggest integer n with n < x.
factorial(n)Calculates n!
trunc(v, p = 0)Truncate v after the p-th decimal.
V(s)Returns the value of the given element, e.g. sliders and angles.

### Screenshot of the Image

Print or save the image via right mouse click.

## More Calculators

Here is a list of of further useful calculators:

Index Derivative calculus Partial derivatives and gradient Differential equations Exponential growth Logistic growth ODE first order General first order ODE ODE second order ODE-System 2x2 ODE-System 3x3 Gradient 2d Plot Function Plot