You are on page 1of 6

University of Bahrain

College of Information Technology


Department of Computer Engineering

ITCE 380: Numerical Analysis


Experiment #2: Taylor Series

STUDENT’S NAME: Amna Azmat Raza Malik


STUDENT’S ID: 20161934
DATE OF SUBMISSION: 14 October 2018
AIM: The aim of this experiment is to get familiar with the MATLAB
commands to find out the taylor series and maclaurian series for different
trigonometric functions.
INTRODUCTION: Taylor series is a representation of a function as an infinite
sum of terms that are calculated from the values of the function's derivatives at a
single point. A Maclaurin series is a Taylor series expansion of a function about 0.

Taylor series expansion represents an analytic function f(x) as an infinite sum of


terms around the expansion point x = a:

Taylor series expansion requires a function to have derivatives up to an infinite order


around the expansion point.
Maclaurin Series Expansion
Taylor series expansion around x = 0 is called Maclaurin series expansion:

Procedure:
1) MATLAB was opened.
2) To Find the Maclaurin series expansions of trignometric functions, the
following commands were entered:
syms x taylor(exp(x)) taylor(sin(x)) taylor(cos(x))
3) The following commands were entered and the ouput was obtained as
follows:
syms x
taylor(exp(-x), 'Order', 10)
taylor((sin(x)/x), 'Order', 10)

4) ExpansionPoint. Was used at Taylor series expansions at x = 1:

syms x taylor(log(x),
'ExpansionPoint', 1)
5) The following commands were entered :
syms x y z
f = sin(x) + cos(y) + exp(z);
taylor(f) with:
syms x y z
f = sin(x) + cos(y) + exp(z);
taylor(f , [x y z])

6) Try Maclaurin series for cotangent. Discuss, why can’t you. How to solve
it?
7) Maclaurin series for tangent, secant and cosecant was obtained
CONCLUSION: In this experiment we found out the taylor series for different
trigonometric functions and we were able to make use of MATLAB commands.

You might also like