Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and.

Similar presentations


Presentation on theme: "CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and."— Presentation transcript:

1 CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and staff of CS 123 Spring 2008 to reproduce these notes for their own use.

2 CS 123 Policies Week(s) ComponentQuantity Individual WeightTotal Weight 2, 4, 6, 8Labs411%44% 3, 5, 7, 9Quizzes45%20% 10Exam136% *Unexcused missed quizzes, labs, or exams will be given a grade of 0. *Course grades will be one of: A, B, C, D or F. Lab Policy : Please note that you should attend your regular lab section, in case of serious problems you can make up the lab in other sections by your and that section’s instructor permit. IF YOU DO NOT ATTEND A LAB AND JUST SUBMIT IT VIA BB YOU SHOULD CONTACT YOUR INSTRUCTOR. ONLY IN EXCUSED PROBLEM CASES YOU WILL RECEIVE A FULL GRADE.

3 Useful Links : 1)Course web Site : https://www.cs.drexel.edu/cs123/spring2008/ 2) Maple TA : (see Course Web site for link – it’s not the same as last term because we are using a newer version of MapleTA) Quiz 1 will be up on this page when it is released at the end of this week 3) Bb Vista (same as always): http://learning.drexel.edu/

4 Calendar ActivityDue Date Lab 1Week 2 (Start: Apr 07 )Week 3 ( Apr 18, 5:00 PM) Quiz 1Start ( Apr 13)Week 3 ( Apr 18, 5:00 PM) Lab 2Week 4Week 5 Quiz 2Week 5 Lab 3Week 6Week 7 Quiz 3Week 7 Lab 4Week 8Week 9 Quiz 4Week 9 Lab exam (in class)Week 10

5 So, What is today’s Lab about? Integration in Maple and how to implement Integrating procedures Goals –Explore Maple's facilities for computing indefinite and definite integrals –View integration algorithmically –Develop some understanding of how a computer can integrate LET’S START WITH MATH DEFINITIONS!

6 Definite integration is equal to the area of a region in the xy- plane bounded by the graph of f, the x-axis, and the vertical lines x = a and x = b, with areas below the x-axis being subtracted.area graph

7 Indefinite integration

8 Fundamental Theorem of Calculus (FTC) Theorem. Let f be a function which is continuous on the interval [a, b]. 1)Let F be an indefinite integral or antiderivative of f. Then: 2) The function : is an indefinite integral or antiderivative of f. That is, A'(x) = f(x) USAGE!?Look at Example 1Look at Example 1 Look at Example 2

9 Integration in Maple “ int” : The Maple int command will handle most integrals that can be done analytically. Both definite and indefinite integrals can be done Example : > int(x^2,x);  1/3 x^3 > int(x^2,x=0..2);  8/3 > int(sin(4*x),x);  -1/4 cos(4x) When Maple can't do an integral, it simply returns it unevaluated  use “EVALF” for definite integration > int(cos(x^3),x=0..1); > evalf(int(cos(x^3),x=0..1)); 0.931776766

10 Maple Commands to verify integration Expand. The expand command is useful for expanding various mathematical expressions: expand(expr, expr1, expr2,...,exprn); >expand((x+1)*(x+2)); Simplify. The simplify command is in some ways the opposite of the expand command: –simplify(expr); –simplify(expr, n1, n2,...); simplify(expr, assume=prop); > simplify(4^(1/2)+3); 5 > simplify((x^a)^b+4^(1/2), power);

11 Simplification at work

12 Testing equality with simplify It still isn’t easy to always get the simplifier to put an expression in exactly the same form that you want. To test equality of expressions, try to simplify their difference. If it’s zero, it means that they are equivalent through some combination of expansions, arithmetic, trig and power laws, etc.

13 Simplification and equality

14 Normal is a simplifier that works only with numerators and denominators Normal can be cheaper than simplify because it is more limited than simplify which is more “kitchen sink”. It can also be more effective because of the limitations, such as its expanded options that works specifically on expanding numerators and denominators without changing anything else.

15 Piecewise continuous functions How to define some function like: If/else doesn’t work! -> use: piecewise( condition, true-expression, otherwise expression) > fexpr:= piecewise( x>=0, x, -1* x); Now solve /diff/ plot/int as before just like other expressions ! >dexpr := diff(fexpr,x);, …

16 Parametric curves and arc length What was arc length ? –S = r * Ɵ How to find in maple!? Include new package: Student[Calculus1][Arclength]([ x expression, y expression], parameter = a..b); Example : >Student[Calculus1][ArcLength](2.15+2.09*x-0.41*x^2,x=0..4.6); 6.651554955

17 Lab structure This lab is divided into the following sections: Required Reading: Introduction & Overview, Tutorials 1-4, Wrap-Up Required Problems: Problems 1-4 Optional Problems: Problems 5 & 6 Work in groups as always !!

18 Wrap up: What to turn in?! Lab 1  Due Apr 18 th,5 P.M Quiz 1  Due Apr 18 th,5 P.M -Submit your lab via Bb Vista -We have office hours in UC145 next week, if you had any problem in Quiz 1 feel free to stop by and ask questions!

19 Any questions!? Good luck! Office hours schedule: -UC 145 during non-class weeks all day from 9 am to 5 p.m., plus occasionally oter hours in later in the day. -Other times you can post questions on Bb discussion area -Email your instructors in case of grading questions, issues, or problems


Download ppt "CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and."

Similar presentations


Ads by Google