1 / 32

Numerical Methods

Numerical Methods. AP Calculus AB Summer Review 2013. Analytical Methods. For as long as you have taken math, you have learned analytical methods to solving problems These methods involve a well-defined procedure and provide an exact answer

Download Presentation

Numerical Methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Numerical Methods AP Calculus AB Summer Review 2013

  2. Analytical Methods • For as long as you have taken math, you have learned analytical methods to solving problems • These methods involve a well-defined procedure and provide an exact answer • even if it’s in terms of a complex or irrational number • Unfortunately, very few “real world” problems are analytical • Most real world problems involve data sets, and you must infer information from these sets AP Calculus AB, SJHS 2013-2014

  3. Numerical Methods • Numerical methods are ways of solving math problems based on data sets, and they do not necessarily require an analytical method or solution • Numerical methods do have an analytical theory behind them, usually involving statistics • These are useful since there are no constraints • Still, you must use caution not to take numerical solutions as absolute answers • they are often approximations • The answers are found by trial and error methods, which a computer algebra system (or “CAS”) can do very quickly • So the computer actually checks which answers work • The one that works best is “printed” as the answer AP Calculus AB, SJHS 2013-2014

  4. Systems of Nonlinear equations • We remember working with systems of linear equations • These are functions of variables to the first power • No other powers or special functions were allowed • You may remember that one method of solving was to draw a graph and find the intersection of the lines • By extension, we can find the intersection(s) of nonlinear functions to find the solution(s) of systems of nonlinear equations • This is numerical since the solution is usually at a value we can’t analytically calculate AP Calculus AB, SJHS 2013-2014

  5. Ex: • First, we should notice that since they both equal y, we can set the functions equal to each other (Method of Substitution) • The problem is that to solve it, we would need to take a logarithm to undo the exponential, but we just trade one problem for another • Which is worse? • Instead, let’s just look at our original problem, and instead view them as two different functions: AP Calculus AB, SJHS 2013-2014

  6. Example continued • Your calculator uses this form! • Type this into your calculator and take a look at the graph • You can also type this into GraphCalc; this program literally took me 1min to install and it was ready for use • http://www.graphcalc.com/, click “Download” at the top left menu in blue, click the first link under Regular Users (GraphCalc.exe), click the green button that says Download Now! (don’t bother with the ad behind it • If you’re a Mac, you can try Graphing Calculator 3D for Mac • http://download.cnet.com/Graphing-Calculator-3D/3000-2053_4-10896524.html#rateit • Now we’re ready for some numerical methods AP Calculus AB, SJHS 2013-2014

  7. Example continued • You should see this graph • As you can see, the intersections occur somewhere around x=-2 and x=5 • How to solve it on your calculator • After you typed in the functions, go to CALC (the 2nd of TRACE) • Click Intersect • It will take you back to the graph; move the cursor near the intersection point (doesn’t have to be exact) & click • It now needs you to confirm this on the other graph, so move to that same intersection point & click • It will now ask for a guess; depending on which intersection, you can give it a guess; otherwise just press enter • There’s your first answer; do this for all other intersection points • How to solve it in Graph Calc • Go to Tools > Equation Solver and click • Type in e^(-x)=-x+5 • Give it your guess; let’s say, -2 • It gives the answer that is closest to your guess; if you said 7, it would’ve given you the other intersection point AP Calculus AB, SJHS 2013-2014

  8. Zeros • A zero is where a function crosses the x-axis • For linear functions, just set y = 0 • We learned a generalanalytical solution, the Quadratic Formula, that solves the zeros of quadratic functions • Occasionally you can easily solve zeros of exponentials, logs, and trig equations • What if we have other equations that need zeros? • This is usually a nonlinear function with a mix of incompatible function types • We can solve these using numerical methods AP Calculus AB, SJHS 2013-2014

  9. Ex: • This does not have an analytical solution, and according to the graph there exist two real roots • We could do a trial and error using the Location Principal • zeros occur between any positive/negative transition • Luckily, modern computers can quickly do this trial and error AP Calculus AB, SJHS 2013-2014

  10. Ex: continued • To solve using the calculator • type in the function • go to CALC (2nd of TRACE), click Zero • Your calculator doesn’t know which zero to find (there could be several), so you need indicate where it is; it asks for a “left bound” then a “right bound” • When it says “Left Bound”, bring the cursor to a point that is left of the zero (doesn’t have to be too close) • When it says “Right Bound”, bring the cursor to a point that is right of the zero (doesn’t have to be too close) • It will ask for a guess; you can provide one, or just press Enter • If you get an error message, you might have placed your bounds around two zeros, so make sure your bounds only surround one answer • To solve in Graph Calc • Go to Tools > Equation Solver and click • Type in x^2+sin(x) … if you don’t give another side of the equation, it will assume you want a zero • Give it your guess • It gives the answer that is closest to your guess AP Calculus AB, SJHS 2013-2014

  11. Linear Regressions • Among the most useful numerical tools is a linear regression • Linear data is the most useful, and if you go into applied science and math you will see that analysis is often done by “linearizing” • The “goodness of fit” is represented by the correlation value, or r2 parameter • Values near 1 are a good fit • Ifr2 = 1, then it is a perfect fit (not likely) • Let’s look at a simple example AP Calculus AB, SJHS 2013-2014

  12. Example • A group of students are surveyed during their freshman year of college. They are anonymously asked their GPA during high school and their first year of college. The results are summarized on the table (no names). • 1 Make a linear regression of the data set, with a proper equation. • 2 Is this a good fit? • 3 What is the high school-to-college GPA factor? What does this mean? • 4 Predict the GPA of a student 1.6 GPA in high school. AP Calculus AB, SJHS 2013-2014

  13. Example continued • We can plot this data set in our calculator, or on a computer we can use Microsoft Excel • Excel: Type in one set in a column, then the other set in another column • To see the data, click Insert and choose Scatter (just the dots) • The Excel table was shown last slide • Calculator: go to STAT > Edit… and several lists will appear • Fill in those lists with data • To display, go to STAT PLOT (2nd of “Y=”) and turn stat plot on • Go to ZOOM, then ZoomStat (it’s there, you just need to find it on the list) AP Calculus AB, SJHS 2013-2014

  14. Example Continued • To make a linear regression • Excel: right click on any data point on the graph (they’ll all light up) and go to “Add Trendline”, and choose Linear • Don’t forget to click “Display equation” and “Display r2” at the bottom. If you forget, just click on the line and go to format trendline • Calculator: STAT > CALC > LinReg(ax+b) • The equation will display • To pull up the r2, go to VARS > Statistics > EQ > r2 AP Calculus AB, SJHS 2013-2014

  15. Example Graph then Linear Regression AP Calculus AB, SJHS 2013-2014

  16. Example continued • 1 Linear regression with equation & r2 • 2 This is an okay fit; r2 in 80 or 90 percent range is very good, but we got about 46% (a little low) • However, the data goes through a lot of points! • 3 The coefficient is .71; this means your GPA is expected to be only about 71% of what it was before. • You’ll notice this is on average, but several students in this data set have basically the same, if not higher, GPAs. It’s a statistical quantity. • 4 To answer our last question, we might jump to say: • However, this point is outside of our data set domain • We cannot predict anything lower than 2.00 or higher than 4.00 since that is the extent of our domain AP Calculus AB, SJHS 2013-2014

  17. Other regressions • Excel has the capability to give regressions for polynomials (up to x6), exponential, logarithmic, and power laws • Calculators like a TI-84 or other graphing calculator can give polynomial (up to x4), exponential, logarithmic (natural and common), power law, and sine regressions • To graph these, go to Y=, then press VARS > Statistics > EQ > ReEq • This menu also stores all constants from your regression AP Calculus AB, SJHS 2013-2014

  18. What kind of Regression is this? Given any data, you cannot assume it is a linear set. First graph the points, then try to eyeball what it looks like. In this case, it is difficult to tell. AP Calculus AB, SJHS 2013-2014

  19. But it Doesn’t Look Linear! AP Calculus AB, SJHS 2013-2014 The r2 is too low, and it clearly doesn’t go through many points. We’ll try another one.

  20. The quadratic is better • You can see that the quadratic is a better fit. • The r2 is much better. • But still not very good... AP Calculus AB, SJHS 2013-2014

  21. Try a Cubic Regression • This r2 is nearly perfect! Looks like a good fit. • Problem: the equation is very complicated. • In this case, it’s better to have a very good answer even if it takes a little more copying. AP Calculus AB, SJHS 2013-2014

  22. No Need to go Too Far • We can take it a step further and get a slightly better r2, but ask yourself, is the more complex formula that much better? • Let’s stick with the cubic in this case AP Calculus AB, SJHS 2013-2014

  23. Sequences and Series • A sequence is a set of numbers that follow a pattern • A series is the summation of some or all numbers of a sequence • Typically, a problem begins with finding the pattern and expressing it numerically • Sequences use a notation similar to function notation • The variable is placed as a subscript to the sequence name AP Calculus AB, SJHS 2013-2014

  24. Example of a Sequence The average temperatures for each month in a city in Arizona are: Some samples from this series are: January m = 1 T1 = 66 July m = 7 T7 = 84 November m =11 T11 = 71 AP Calculus AB, SJHS 2013-2014

  25. Example of a Series A small business has the following revenues. 90% of that money goes towards expenses, so the business profits one-tenth of the revenues. How much does the business profit in one year? We model the year profits as a series, which means we add up all revenue numbers (from the first to the twelfth months), taking only one tenth of each AP Calculus AB, SJHS 2013-2014 We say: “P equals the sum from n equals 1 to 12 of one-tenth R-n”

  26. Finding Patterns of Sequences • At first, you should verbalize the pattern, then figure out a way to express it mathematically • Always mentally check the first few terms by substituting in n = 1, 2, etc to see if they match up with your sequence • Some common patterns: Arithmetic: There is a common difference between each number Geometric: There is a common ratio between each number. Exponential: The numbers relate to an exponent of the sequence term. Alternating: Numbers alternate positive and negative. Even: All numbers are even, or have a strictly even component. Odd: All numbers are odd, or have a strictly odd component. Recursive: Each term is dependent on the value of one or more previous terms. AP Calculus AB, SJHS 2013-2014

  27. Arithmetic Sequence Examples For each sequence, determine the common difference d, then write an expression for the sequence. Assume each sequence starts at n=0. Pattern: each number is 8 more than the previous! That’s the common difference, and each term adds 8. a) b) Notice that you can plug in n = 0, 1, 2, 3,... And the result is the given sequence AP Calculus AB, SJHS 2013-2014

  28. Geometric Sequences a) b) c) Find the common ratio r to each geometric sequence. Then write an expression for the sequence. Assume each sequence begins at n = 0. Pattern: each number is 2/3 of the previous! That’s the common ratio, and each term is multiplied by 2/3. This is expressed as an exponent. AP Calculus AB, SJHS 2013-2014

  29. Constructing Sequences Alternating: factor of (-1)n • as n goes from even to odd, so will your sequence Even numbers: use 2n • This is always even Odd numbers: use (2n+1) • This is always odd Recursive: include an-1, an-2, etc - These indicate “the term before n”, “two terms before n”, etc AP Calculus AB, SJHS 2013-2014

  30. Describe each sequence, and Express Each in Sequence Notation. a) b) c) d) e) *the denominators are all perfect odd squares *each term is an even square, plus three *these are the factors of seven, alternating positive and negative AP Calculus AB, SJHS 2013-2014 *this is clearly the sequence of squares *we can also look at it as recursive, with each term being the previous plus the odd numbers in sequence - Start at zero, add 1, add 3, add 5, add 7... *these are exact values of cosine, on intervals of pi/6

  31. Numerical Methods Assignment • This quiz opens July 29 and closes Aug 12 • This is the last quiz and assignment, so please enjoy the last part of your summer before we begin the class AP Calculus AB, SJHS 2013-2014

  32. End AP Calculus AB, SJHS 2013-2014 toothpastefordinner.com

More Related