Given a positive number x, the task is to find the natural log (ln) and log to the base 10 (log10) of this number with the help of expansion.
Input: x = 5 Output: ln 5.000 = 1.609 log10 5.000 = 0.699 Input: x = 10 Output: ln 10.000 = 2.303 log10 10.000 = 1.000
- The expansion of natural logarithm of x (ln x) is:
- Therefore this series can be summed up as:
- Hence a function can be made to evaluate the nth term of the sequence for 1 ≤ x ≤ n
- Now to calculate log10 x, below formula can be used:
Below is the implementation of the above approach:
ln 5.000 = 1.609 log10 5.000 = 0.699
- Sum of N terms in the expansion of Arcsin(x)
- Sum of the Tan(x) expansion upto N terms
- Program to calculate the value of sin(x) and cos(x) using Expansion
- Middle term in the binomial expansion series
- Program to print binomial expansion series
- Find K such that |A - K| = |B - K|
- Find 2^(2^A) % B
- Find the value of max(f(x)) - min(f(x)) for a given F(x)
- Find (1^n + 2^n + 3^n + 4^n) mod 5 | Set 2
- Find value of (1^n + 2^n + 3^n + 4^n ) mod 5
- Find value of (n^1 + n^2 + n^3 + n^4) mod 5 for given n
- Find the value of f(n) / f(r) * f(n-r)
- Find the sum of the series 2, 5, 13, 35, 97...
- Find sum of the series 1-2+3-4+5-6+7.......
- Find the sum of series 3, 7, 13, 21, 31....
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.