User Tools

Site Tools


gibson:teaching:fall-2012:math445:lab3

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gibson:teaching:fall-2012:math445:lab3 [2012/09/05 19:48]
gibson [Problem E]
gibson:teaching:fall-2012:math445:lab3 [2012/12/05 09:11] (current)
gibson [Problem F]
Line 131: Line 131:
 values for ''​n''​ where $n_j = 2^j$ with //j = 1, ..., 20//. Then for each of  values for ''​n''​ where $n_j = 2^j$ with //j = 1, ..., 20//. Then for each of 
 the values of n, again using a ''​for''​ loop, calculate ​ the values of n, again using a ''​for''​ loop, calculate ​
-$a_j = (1 + 1.00/n_j )^{n_j}$ for ''​j = 1, ..., 20''​. Plot the values of //a//.+$a_j = (1 + 1.00/n_j )^{n_j}$ for //j = 1, ..., 20//. Plot the values of //a//.
 Next plot //e − a//.  You should see a graph that is not very informative ​ Next plot //e − a//.  You should see a graph that is not very informative ​
 since the values quickly go to zero. Instead we will plot the graph on a log  since the values quickly go to zero. Instead we will plot the graph on a log 
Line 140: Line 140:
 Turn in all plots. ​ Turn in all plots. ​
  
-**Bonus:** What happens if you let ''​j = 1, ..., 60''​? What happens if when you  +**Bonus:** What happens if you let //j = 1, ..., 60//? What happens if when you  
-let $n_j = 10^j$ for ''​j = 1,...,16''​? Can you make a reasonable guess as to+let $n_j = 10^j$ for //j = 1,...,16//? Can you make a reasonable guess as to
 what's happening here? what's happening here?
  
Line 148: Line 148:
  
 <​latex>​ <​latex>​
-\lim_{n\rightarrow \infty} (1 + 0.754/n)^nn = e^{0.754}+\lim_{n\rightarrow \infty} (1 + 0.754/n)^n= e^{0.754}
 </​latex>​ </​latex>​
  
Line 156: Line 156:
 the command ''​exp(0.754)''​. the command ''​exp(0.754)''​.
  
-GWe have used several MATLAB functions so far. Now we are going to write our +==== Problem ​==== 
 + 
 + We have used several MATLAB functions so far. Now we are going to write our 
 own function. In the main MATLAB window click File → New → Script ​ own function. In the main MATLAB window click File → New → Script ​
 (or File → New → m-file depending on your version of MATLAB). This will open a  (or File → New → m-file depending on your version of MATLAB). This will open a 
Line 192: Line 194:
 the last line. Turn in the code for your function. the last line. Turn in the code for your function.
  
-HEnter the command ''​format long''​ then verify the following properties of +==== Problem ​==== 
 + 
 + Enter the command ''​format long''​ then verify the following properties of 
 exponentials and logarithms by testing the appropriate MATLAB functions with  exponentials and logarithms by testing the appropriate MATLAB functions with 
 the parameters indicated: ​ the parameters indicated: ​
Line 205: Line 209:
  
 <​latex>​ <​latex>​
-log(ab) = log(a) + log(b), \text{ for } a = 0.1, b = 5+\log(ab) = \log(a) + \log(b), \text{ for } a = 0.1, b = 5
 </​latex>​ </​latex>​
  
  
 <​latex>​ <​latex>​
-log(a^b) = b log(a), \text{ for } a = 3, b = 3+\log(a^b) = b \log(a), \text{ for } a = 3, b = 3
 </​latex>​ </​latex>​
  
 Note the ''​log''​ function in matlab is the natural logarithm. How would you  Note the ''​log''​ function in matlab is the natural logarithm. How would you 
-calculate $\log_{10}$ , $log_2$ , or $log_5$?+calculate $\log_{10}$ , $\log_2$ , or $\log_5$?
  
gibson/teaching/fall-2012/math445/lab3.1346899721.txt.gz · Last modified: 2012/09/05 19:48 by gibson