maths.series.logarithmic_series

This is an implementation of logarithmic series in Python. Reference: https://math.stackexchange.com/questions/3973429/what-is-a-logarithmic-series

Functions

logarithmic_series(→ list)

Returns the logarithmic series for a number x (log x) upto n terms.

Module Contents

maths.series.logarithmic_series.logarithmic_series(x_value: float, n_terms: int = 5, expand: bool = False) list

Returns the logarithmic series for a number x (log x) upto n terms.

Parameters:

x_value: a floating point number for log(x) n_terms: number of terms to be computed expand: Set this flag to get the terms as real numbers,

unset for unsolved expressions

Examples:
>>> logarithmic_series(3)
['(2^1)/1', '-(2^2)/2', '(2^3)/3', '-(2^4)/4', '(2^5)/5']
>>> logarithmic_series(-3)
['-(4^1)/1', '(4^2)/2', '-(4^3)/3', '(4^4)/4', '-(4^5)/5']
>>> logarithmic_series(3, 6)
['(2^1)/1', '-(2^2)/2', '(2^3)/3', '-(2^4)/4', '(2^5)/5', '-(2^6)/6']
>>> logarithmic_series(3, expand=True)
[2.0, -2.0, 2.6666666666666665, -4.0, 6.4]