====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gibson:teaching:spring-2015:math445:hw2 [2015/02/15 18:09] gibson |
gibson:teaching:spring-2015:math445:hw2 [2015/02/16 06:41] (current) gibson |
||
---|---|---|---|
Line 5: | Line 5: | ||
sum, linspace, colon syntax, dot syntax | sum, linspace, colon syntax, dot syntax | ||
* (mat-vec mult), \, norm, | * (mat-vec mult), \, norm, | ||
- | plot, semilogy, semilogx, loglog, xlabel, ylabel, legend, axis, grid | + | plot, semilogy, semilogx, loglog, xlabel, ylabel, legend, axis, grid, axis |
hist, randn | hist, randn | ||
+ | exp | ||
**Problem 1:** Write a Matlab expression that sums the first N of each series and evaluate it for N=100. | **Problem 1:** Write a Matlab expression that sums the first N of each series and evaluate it for N=100. | ||
Line 37: | Line 38: | ||
**Problem 8:** Make a histogram of 1000 random numbers from a normal (Gaussian) distribution. Use Matlab's ''hist'' and ''randn'' functions. | **Problem 8:** Make a histogram of 1000 random numbers from a normal (Gaussian) distribution. Use Matlab's ''hist'' and ''randn'' functions. | ||
- | **Problem 9:** Chemicals A and B combine in reaction to form chemical C. The rate of production of C is proportional to the amount of A and the amount of C present at any given time: $dC/dt = \alpha A(t) B(t)$. 2 gm of A combine with 1 gm of B to form 3 gm of C. At the start of the reaction there are 40 gm A, 50 gm B, and 0 gm C. After 3 minutes there are 10 gm C. | + | **Problem 9:** Chemicals A and B combine in reaction to form chemical C. The rate of production of C is proportional to the amount of A and the amount of C present at any given time: $dC/dt = \alpha A(t) B(t)$. 2 gm of A combine with 1 gm of B to form 3 gm of C. At the start of the reaction there are 40 gm A, 50 gm B, and 0 gm C. After 5 minutes there are 10 gm of C. |
- | You can use differential equations to solve this problem and determine the amounts of | + | This is a problem in differential equations. If you take MATH 527 you will learn how to solve this problem and determine the amounts of A, B, and C (in grams) as a function of time t (in minutes). These functions are |
- | A, B, and C as a function of time. These functions are | + | |
\begin{eqnarray*} | \begin{eqnarray*} | ||
- | A(t) &= 300 (e^{-0.0192 t}-1)/(5e^{-0.0192 t - 2}) \\ | + | C(t) &= 300 (e^{0.0227 t}-1)/(5e^{0.0227 t} - 2) |
- | B(t) &= 40 - 2/3 A(t)\\ | + | \end{eqnarray*} |
- | C(t) &= 50 - 1/3 A(t) | + | \begin{eqnarray*} |
+ | A(t) &= 40 - 2/3 \; C(t) | ||
\end{eqnarray*} | \end{eqnarray*} | ||
+ | \begin{eqnarray*} | ||
+ | B(t) &= 50 - 1/3 \; C(t) | ||
+ | \end{eqnarray*} | ||
+ | |||
+ | Make a plot of A, B, and C versus t for t between 0 and two hours. Label the horizontal axis and indicate which curve is which with a legend. | ||
+ | |||
+ | **Problem 10:** Use the graph from problem 9 to answer the following questions about the reaction. You might need to refine your plot and zoom in answer some of these. | ||
+ | |||
+ | (a) How much A,B, and C are present after one hour?\\ | ||
+ | (b) How much C is eventually produced?\\ | ||
+ | %%(c)%% Are A and B fully depleted in the long-term limit? If not, how much of each are left?\\ | ||
+ | (d) Does your answer to %%(c)%% make sense, given the problem description? Explain.\\ | ||
+ | (e) How long does it take for the reaction to reach 95% completion? | ||
+ | |||
+ | |||
+ | |||
+ |