DOC PREVIEW
TAMU PETE 301 - 301.505.Lab2_Situ_E

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

(This sheet must be included with your work submission)Required Academic Integrity Statement: (Texas A&M University Policy Statement)Coursework Copyright Statement: (Texas A&M University Policy Statement)Lab Assignment Coversheet(This sheet must be included with your work submission)Required Academic Integrity Statement: (Texas A&M University Policy Statement)Academic Integrity StatementAll syllabi shall contain a section that states the Aggie Honor Code and refers the student to the Honor Council Rules andProcedures on the web.Aggie Honor Code"An Aggie does not lie, cheat, or steal or tolerate those who do."Upon accepting admission to Texas A&M University, a student immediately assumes a commitment to uphold the Honor Code, to accept responsibility for learning and to follow the philosophy and rules of the Honor System. Students will be required to state their commitment on examinations, research papers, and other academic work. Ignorance of the rules does not exclude any member of the Texas A&M University community from the requirements or the processes of the Honor System. For additional information please visit: www.tamu.edu/aggiehonor/On all course work, assignments, and examinations at Texas A&M University, the following Honor Pledge shall be preprintedand signed by the student:"On my honor, as an Aggie,I have neither given nor received unauthorized aid on this academic work."Aggie Code of Honor:An Aggie does not lie, cheat, or steal or tolerate those who do.Required Academic Integrity Statement:"On my honor, as an Aggie, I have neither given nor receivedunauthorized aid on this academic work." Evan Situ _________(Print your name) Evan Situ _______(Your signature)Coursework Copyright Statement: (Texas A&M University Policy Statement)The handouts used in this course are copyrighted. By "handouts," this means all materials generated for this class, which include but are not limited to syllabi, quizzes, exams, lab problems, in-class materials, review sheets, and additional problem sets. Because these materials are copyrighted, you do not have the right to copy them, unless you are expressly granted permission.As commonly defined, plagiarism consists of passing off as one’s own the ideas, words, writings, etc., that belong to another. In accordance with this definition, you are committing plagiarism if you copy the work of another person and turn it in as your own, even if you should have the permission of that person. Plagiarism is one of the worst academic sins, for the plagiarist destroys the trust among colleagues without which research cannot be safely communicated.If you have any questions about plagiarism and/or copying, please consult the latest issue of the Texas A&M University Student Rules, under the section "Scholastic Dishonesty."Lab Assignment Grading Rubric(This sheet must be included with your work submission)Criteria PointsAdherence to the SPE Style Guide & Petroleum Engineering Handbook / 10Grammar/Professionalism / 5Completeness of Literature Review / 15Completeness of Introduction / 10Completeness of Methodology / 15Completeness of Discussion / 15Completeness of Conclusions / 10Completeness of References / 10Completeness of Nomenclature / 10Final Grade /100During this lab, the concepts of Taylor’s Series and error were used. Taylor’s Series is a formula that can be effectively utilized to make an approximation by predicting the function value at one point in terms of the function value and its derivative at another point. Below, this paragraph, Eq. 1 represents the Taylor’s Series Approximation Equation. As one makes imperative approximations with Taylor’s Series, numerical errors during such mathematical operations, or procedure, can arise. Such numerical error that can occur during the arithmetic operations is truncation error. Truncation error is a type of error that occurs when approximations are used to represent mathematical procedures. This kind of error can be calculated by using Eq.2.f(xi+1)=f(xi)+f'(xi)h+f' '(xi)h22 !+f(3)(xi)h33!+…+fn(xi)hnn !+Rn……………...……………………Eq. 1Et=¿ actual solution− approximate solution∨¿…………………………………………………………Eq. 2IntroductionThe objective of this lab was to successfully create Taylor’s Series Approximation of Cos(X) VBA functions that can accept the two arguments: the value of x (in radians) and n, the number of terms to include in the Taylor Series approximation (upper limit of truncated summation). After fulfilling this significant objective, another goal of this experiment was to generate more accurate results that have errors less than the maximum absolute true error. MethodologyOption Explicit'Determine sign of terms for Cosine Maclaurin Series ExpansionFunction cos_sign(i As Long) As LongIf i Mod 4 = 0 Or i Mod 4 = 3 Thencos_sign = 1 Else cos_sign = -1 End If End FunctionFunction cos_a0(x As Double, n As Integer) As DoubleDim i As LongConst a As Integer = 0cos_a0 = 1For i = 2 To n Step 2cos_a0 = cos_a0 + cos_sign(i) * (x - a) ^ i / Application.WorksheetFunction.Fact(i)Next iEnd FunctionFunction cos_a1(x As Double, n As Integer) As DoubleDim i As LongDim pi As Double, temp As Doublepi = Application.WorksheetFunction.pi()temp = 1 / Sqr(2)cos_a1 = tempFor i = 1 To ncos_a1 = cos_a1 + cos_sign(i) * temp * (x - pi / 4) ^ i / Application.WorksheetFunction.Fact(i)Next iEnd FunctionFunction choose1(x As Double, n As Integer) As Double Dim pi As Double pi = Application.WorksheetFunction.pi() If (x <= pi / 8) Then choose1 = cos_a0(x, n) Else choose1 = cos_a1(x, n) End If End FunctionDiscussionFigure 1 – Actual Solutions of Cos(X)Figure 1 – Cos(X) Taylor Approximation Series in VBA with N Terms About A = 0Figure 2 – Error Calculation of Cos(X) Taylor Approximation Series with N Terms About A = 0Figure 3 – Cos(X) Taylor Approximation Series in VBA with N Terms About A = Pi/4Figure 4 – Error Calculation of Cos(X) Taylor Approximation Series with N Terms About A = Pi/4Figure 5 – Cos(X) Taylor Approximation Series With N Terms About A = Pi/8Figure 6 – Error Calculation of Cos(X) Taylor Approximation Series With N Terms About A = Pi/8Conclusions- Taylor’s Series of Cos(X) about a = pi/8 provides better approximations overall than both the Taylor’s Series of Cos(X) about a = 0 and the Taylor’s Series of Cos(X) about a = pi/4. -


View Full Document

TAMU PETE 301 - 301.505.Lab2_Situ_E

Documents in this Course
Load more
Download 301.505.Lab2_Situ_E
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 301.505.Lab2_Situ_E and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 301.505.Lab2_Situ_E 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?