def definition_area_ref(t, x0):
    """
    reference solution for ode with respricted definition area.
    :param t: time
    :param x0: initial value
    :return: samples of reference solution for time t
    """
    x_ref = 1. / (1. / x0 - 1. / 2. * (t ** 2))  # analytical solution of this ODE
    return x_ref