Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Matlab Help...

Status
Not open for further replies.

armin999

New Member
. Show that lim n -->inf (1+1/n)^n=e
Do this by first creating a vector n that has the elements: 1 10 100 500 1000 2000 4000 and 8000. Then, create a new vector y in which each element is determined from the elements of n by (1+1/n)^n
Compare the elements of y with the value of e (type exp(1) to obtain the value of e).

(I did this without using matlab but I want to do with matlab ( I am new with the matlab))
lim n→+∞ [(1 - 1/n)⁽⁻ⁿ⁾]⁻¹ =
lim n→+∞ {[(n - 1) /n ]⁽⁻ⁿ⁾}⁻¹ =
lim n→+∞ {{1/ [(n - 1) / n ]} ⁿ}⁻¹ =
lim n→+∞ {[ n /(n - 1)]ⁿ}⁻¹ =
verify that n / (n - 1) can be written as
therefore lim n→+∞ [1+1/(n -1)]⁽ⁿ⁻¹⁾→ e 1+1/(n - 1), so:
lim n→+∞ {[ n /(n - 1)]ⁿ}⁻¹ = lim n→+∞ {[ 1+1/(n -1)]ⁿ}⁻¹ =
lim n→+∞ {[1+1/(n -1)]∙[1+1/(n -1)]⁽ⁿ⁻¹⁾}⁻¹ =
notice that if n→+∞ then (n -1) →+∞ too,

and, finally
lim n→+∞ [(1+0)∙e]⁻¹ = 1/e
If also this one is wrong tell me ......
 
I'm pretty experienced with matlab, but I'm going to need a bit more specific of a question to help you.
 
n = [1 10 100 500 1000 2000 4000 8000] %instantiate n values
y = (1 + (1./n)).^n %compute and store approximations at each n value
exp(1) %actual value of e

Look at the values stored in vector y and compare with exp(1).
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top