Introduced Geometric progression (#21517)
* Introduced Geometric progression * Fixed some typos and added geometric mean * fixed some more typos * Added Design Patterns book * added design pattern bookspull/33103/head
parent
4e22e660dc
commit
519f08da03
|
@ -371,6 +371,13 @@ title: Books to Read for Programmers
|
||||||
- http://javascriptbook.com/
|
- http://javascriptbook.com/
|
||||||
- ISBN-13: 978-1118531648
|
- ISBN-13: 978-1118531648
|
||||||
|
|
||||||
|
# Design Patterns
|
||||||
|
|
||||||
|
https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/
|
||||||
|
|
||||||
|
https://www.amazon.com/Head-First-Design-Patterns-Brain-Friendly/dp/0596007124
|
||||||
|
|
||||||
|
|
||||||
This list was compiled from multiple suggestion threads on Reddit and Stackoverflow.
|
This list was compiled from multiple suggestion threads on Reddit and Stackoverflow.
|
||||||
|
|
||||||
Please feel free to add more that you have found useful!
|
Please feel free to add more that you have found useful!
|
||||||
|
|
|
@ -3,13 +3,42 @@ title: Geometric Series
|
||||||
---
|
---
|
||||||
## Geometric Series
|
## Geometric Series
|
||||||
|
|
||||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/mathematics/geometric-series/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
|
||||||
|
|
||||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
A geometric progression is a sequence of numbers, whose first term is non zero and each term is obtained by multiplying its proceding term by a constant quantity. This constant quantity is called common ratio of the GP.
|
||||||
|
|
||||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
The sum of this progression is called geometric series.
|
||||||
|
|
||||||
#### More Information:
|
We can say if a1,a2,a3,....,an are in GP then
|
||||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
|
||||||
|
|
||||||
|
<a href="https://www.codecogs.com/eqnedit.php?latex=\frac{a_{2}}{a_{1}}&space;=&space;\frac{a_{3}}{a_{2}}=...\frac{a_{n}}{a_{n-1}}&space;=&space;r" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{a_{2}}{a_{1}}&space;=&space;\frac{a_{3}}{a_{2}}=...\frac{a_{n}}{a_{n-1}}&space;=&space;r" title="\frac{a_{2}}{a_{1}} = \frac{a_{3}}{a_{2}}=...\frac{a_{n}}{a_{n-1}} = r" /></a>
|
||||||
|
|
||||||
|
<a href="https://www.codecogs.com/eqnedit.php?latex=\boldsymbol{r}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\boldsymbol{r}" title="\boldsymbol{r}" /></a> is known as common ratio of GP.
|
||||||
|
|
||||||
|
if a is the first term then GP can be written as <a href="https://www.codecogs.com/eqnedit.php?latex=a,ar,ar^{2},...,ar^{n-1}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?a,ar,ar^{2},...,ar^{n-1}" title="a,ar,ar^{2},...,ar^{n-1}" /></a>
|
||||||
|
|
||||||
|
example of a GP : 2,4,8,16,....
|
||||||
|
|
||||||
|
## The nth term of GP (Also known as General term)
|
||||||
|
|
||||||
|
Let a be the first term, r be the common ratio and l be the last term of a GP, then nth term is given by
|
||||||
|
|
||||||
|
<a href="https://www.codecogs.com/eqnedit.php?latex=T_{n}&space;=&space;l&space;=&space;ar^{^{n-1}}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?T_{n}&space;=&space;l&space;=&space;ar^{^{n-1}}" title="T_{n} = l = ar^{^{n-1}}" /></a>
|
||||||
|
|
||||||
|
where <a href="https://www.codecogs.com/eqnedit.php?latex=r=\frac{T_{n}}{T_{n-1}}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?r=\frac{T_{n}}{T_{n-1}}" title="r=\frac{T_{n}}{T_{n-1}}" /></a>
|
||||||
|
|
||||||
|
# The sum of n terms of a GP
|
||||||
|
|
||||||
|
Let a be the first term, r be the common ratio and l be the last term of a GP, then sum of n terms is given by:
|
||||||
|
<a href="https://www.codecogs.com/eqnedit.php?latex=S_{n}=\left\{\begin{matrix}\frac{a\left&space;(&space;r^{n}&space;-1\right&space;)}{r-1},&space;r>1&space;&&space;\\&space;\frac{a\left&space;(&space;1-r^{n}&space;\right&space;)}{1-r},&space;r<1&space;&&space;\end{matrix}\right." target="_blank"><img src="https://latex.codecogs.com/gif.latex?S_{n}=\left\{\begin{matrix}\frac{a\left&space;(&space;r^{n}&space;-1\right&space;)}{r-1},&space;r>1&space;&&space;\\&space;\frac{a\left&space;(&space;1-r^{n}&space;\right&space;)}{1-r},&space;r<1&space;&&space;\end{matrix}\right." title="S_{n}=\left\{\begin{matrix}\frac{a\left ( r^{n} -1\right )}{r-1}, r>1 & \\ \frac{a\left ( 1-r^{n} \right )}{1-r}, r<1 & \end{matrix}\right." /></a>
|
||||||
|
|
||||||
|
and <a href="https://www.codecogs.com/eqnedit.php?latex=S_{n}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?S_{n}" title="S_{n}" /></a> is not defined for r=1
|
||||||
|
|
||||||
|
# Geometric Mean
|
||||||
|
|
||||||
|
if we insert geometric mean between two numbers <a href="https://www.codecogs.com/eqnedit.php?latex=n_{1}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?n_{1}" title="n_{1}" /></a> and <a href="https://www.codecogs.com/eqnedit.php?latex=n_{2}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?n_{2}" title="n_{2}" /></a> , then
|
||||||
|
|
||||||
|
Geometric mean = <a href="https://www.codecogs.com/eqnedit.php?latex=\sqrt{n_{1}*n_{2}}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\sqrt{n_{1}*n_{2}}" title="\sqrt{n_{1}*n_{2}}" /></a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue