def f(E, l, kappa=1):
    """
    The implementation of the function f in the differential equation

    E' = f(E, l, k) 

    with

    f(E, l, k) = k * E * l * (1 - E^2) / (1 + l*E^2) 
    """
    return kappa * E * l * (1. - E**2) / (1. + l * E**2)