Sie sind auf Seite 1von 3

Math 206 Project 2 First Submission due Thu 14 February 2013 at 11:59pm Second Submission due Sun 17 February

2013 at 11:59pm What to Submit: For this project you will need to create and submit a single script m-le called project2.m. This le should do all of the things requested in the problems below in the order specied. Grading Method: For grading we will run this m-le through Matlab. If there are any unexpected errors then the project will automatically earn a grade of 0 so make sure you run your m-le through Matlab and check the output before submitting! Be very careful about making sure that any necessary symbolic variables are dened in your code. The assumption should be that we will run your m-le through a clear matlab process. Assuming your script m-le goes through we will grade each question as correct or incorrect based upon its output. Point values are specied, remaining point values (10 pts) are for details like the le name and using a single Matlab entry where requested. You do not need to number the problems in any way, just be sure to include them in your m-le in the order they are listed below. The phrase single Matlab entry means a Matlab command or compound command on a single line with no semicolons separating commands. For example the rst of the following is acceptable while the second is not, even though both do the same thing. Acceptable: log(asind(0.5)) Unacceptable: asind(0.5);log(ans) The point of asking for answers like this is to make sure you are able to construct useful compound commands. Any question which does not request a single Matlab entry can be done on as many lines as you wish.

The Problems: Each of the following should be done with a single Matlab entry unless otherwise specied. 1. Clear out Matlab with clear all. 2. Set long formatting with format long. 3. Set compact output with format compact. 4. Declare all symbolic variables you will need for the project. 5. Find the approximate slope of the line tangent to f (x) = sin
x1 2x+3

[1 pt] [1 pt] [1 pt] [4 pt] at x = 2. [5 pts]

6. The distance traveled by an object is dictated by the function r(t) = t2 e2t . Find the approximate acceleration of the object at t = 2. 7. Evaluate x2 23x dx with int.
1 2x

[5 pts] [5 pts]

8. Use int to nd the volume obtained when the area below sin rotated about the x-axis.

from x = 0 to x = /3 is

[5 pts] [10 pts]

9. Use int to evaluate the integral whose result is the area between the functions y = x2 + 3 and y = 2x + 6. How you nd the interval of integration is up to you and is not part of this assignment but the interval should be exact. 10. If an object has acceleration given by a(t) = 5t 2 , use quad to approximate the velocity t change the object undergoes between t = 10 and t = 20. 11. Solve the initial value problem
dy dt

[10 pts] [10 pts] [10 pts]

y t

= t with y(2) = 1.

12. Argon-41 has a decay constant of 0.3794 (using hours). A sample initially contains 1000g of Argon at t = 0 which is not only decaying but an additional 0.02g is removed each hour. Use dsolve wrapped in subs to solve the corresponding initial value problem and nd the amount remaining after 24 hours. 13. Plot the solution to the initial value problem dsolve wrapped in ezplot. 14. (a) Declare the function f (x) = (b) Evaluate f (2). (c) Evaluate f (2). (d) Evaluate
2 0 x 2x+3 dy dt

= 0.3y(y 500) with y(0) = 490 using

[10 pts] [5 pts] [5 pts] [5 pts] [5 pts] [5 pts] [5 pts] [5 pts]

symbolically.

f (x) dx.

(e) Plot f (x) using ezplot. 15. (a) Declare the function g(x) = x1 +1 with a function handle. 3 Note: Use .^ and ./ in light of question (d). (b) Evaluate g(5). (c) Evaluate (x g(x)) (5). (d) Use quad to approximate
6 5 2

[5 pts] xg(x) dx. [5 pts] [10 pts] [10 pts]

16. Use a three-line for loop with disp to print your age the number of times equal to the number of letters in your rst and last names combined. 17. Use a three-line for loop with disp to nd
a a

x2 dx for a = 0, 1, 2, 3, 4, 5.

18. (a) Dene the function g(x) = x2 4x + 1 as a function handle. (b) Use a three-line for loop to nd and display g (1), g (2), g (3), g 19. (a) Dene a function handle for the function f (x) = x2 . (b) Dene the variable S to equal zero. (c) Use a three-line for loop to add each of the following to S: f (0), f (0.2), ..., f (1.8), f (2). Dont display anything. (d) After the loop use disp to display the nal value of S. 20. (a) Dene the variable Y to be your age in years. (b) Dene the variable S to equal zero. (c) Use a four-line while loop to increase S by Y each time and also divide Y in half. Do this while Y 1. Dont display anything.

[5 pts] (4) [10 pts] [1 pts] [1 pts] [10 pts] [2 pts] [1 pts] [1 pts] [10 pts] [2 pts]

(d) After the loop use disp to display the nal value of S.

Das könnte Ihnen auch gefallen