Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
46 views

Numerical Methods Laboratory Exercise

1. The document provides instructions for calculating Taylor series expansions of various functions around a point a. It defines several variables and intermediate calculations for finding the Taylor series terms of order 0 through 4 for the functions sin(x), xsin(x)-1, e^sin(x), and cos(e^x). 2. The Taylor series terms are calculated using the function value at a, its derivatives evaluated at a, and the differences of x and a. 3. The final expressions for the Taylor series approximations through order 4 are provided for each function.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Numerical Methods Laboratory Exercise

1. The document provides instructions for calculating Taylor series expansions of various functions around a point a. It defines several variables and intermediate calculations for finding the Taylor series terms of order 0 through 4 for the functions sin(x), xsin(x)-1, e^sin(x), and cos(e^x). 2. The Taylor series terms are calculated using the function value at a, its derivatives evaluated at a, and the differences of x and a. 3. The final expressions for the Taylor series approximations through order 4 are provided for each function.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

ADAMSON UNIVERSITY

College of Engineering
Electronics Engineering Department
2nd Sem. S. Y. 2015-2016

TAYLOR SERIES EXPANSION


Exercise #1

HERRERA, AILEEN MAY S.

Numerical Methods Lab.


59032
Friday 14:00-17:00

____________________________________
Engr. Alain Bernard C. Raola
Given a: L6 =17

L1 =PI()/180
L2 =L6*L1
L3 =SIN(L2)
L4 =COS(L2)
L5 =(EXP(L2))

1.
f ( x )=sin x
I2 = SIN(B2*L1)
f ( x )=f ( a ) +f ' ( a ) ( xa )+ f ' ' ( a )

( xa )2 ' ' ' ( x a )3 IV ( xa )4


+ f ( a)
+ f (a)
2!
3!
4!

H2 = C2 + D2 + E2 + F2 + G2

f ( x )=sin x
f ( a )=sin a
C2 = L3

f ' ( x )=cos x
'
f ( a ) ( xa )=cos a ( xa )

E2 = -L3 * (B2*L1 - L2)^2 *


f ' ' ' (x)=cos x

f ' ' ' (a )

F2 = -L4 * (B2*L1 - L2)^3 * 1/6

f IV ( x )=sin x

D2 = L4 * (B2*L1 - L2)
f IV ( a )
f ' ' ( x )=sin x
f ' ' ( a)

( xa )2
( xa )2
=sin a
2!
2

( xa )3
( xa )3
=cos a
3!
6

( xa ) 4
( xa )4
=sin a
4!
24

G2 = L3 * (B2*L1 - L2)^4 * 1/24

2.
f ( x )=x sin x 1
I3 = ( B3*L1 * SIN(B3*L1) ) 1
f ( x )=f ( a ) +f ' ( a ) ( xa )+ f ' ' ( a )

( xa )2 ' ' ' ( x a )3 IV ( xa )4


+ f ( a)
+ f (a)
2!
3!
4!

H3 = C3 + D3 + E3 + F3 + G3

f ( x )=x sin x 1
f ( a )=a sin a1
C3 = L2*L3 - 1

f ' ( x )=x cos x+ sin x


'
f ( a ) ( xa )=( a cos a+ sin a ) ( xa )

D3 = (L2*L4 + L3) * (B3*L1 - L2)

''
f ( x )=x (sin x ) +cos x ( 1 )+ cos x=x sin x +2 cos x

( xa )2
( xa )2
f ( a)
= (a sin a+ 2cos a )
2!
2
''

E3 = (-L2*L3 + 2*L4) * (B3*L1 - L2)^2 *

f ' ' ' ( x )=x cos x +sin x (1 ) +2 (sin x )=x cos x3 sin x
f ' ' ' (a )

( xa )3
( xa )3
=(a cos a3 sin a )
3!
6

F3 = (-L2*L4 - 3*L3) * (B3*L1 - L2)^3 *1/6

f IV ( x )=x (sin x )+ cos x (1 )3 cos x=x sin x4 cos x


f IV ( a )

( xa ) 4
( xa )4
=( a sin a4 cos a )
4!
24

H3 = (-L2*L3 - 4*L4) * (B3*L1 - L2)^4 * 1/24

3.
f ( x )=e sin x
I4 = EXP(SIN(B4*L1))

( xa )2 ' ' ' ( x a )3 IV ( xa )4


f ( x )=f ( a ) +f ( a ) ( xa )+ f ( a )
+ f ( a)
+ f (a)
2!
3!
4!
'

''

H4 = C4 + D4 + E4 + F4 + G4

f ( x )=e sin x
f ( a )=e

sina

C4 = EXP(L3)

f ' ( x )=esin x cos x


'
sina
f ( a ) ( xa )=e cos a ( xa )

D4 = EXP(L3) * L4 * (B4*L1 - L2)

f ' ' ( x)=esin x (sin x ) +cos x ( e sin x ) ( cos x )=esin x sin x +e sin x cos2 x
f ' ' ( x )=e sin x ( sin x cos2 x )

( xa )2
( xa )2
sin a
2
f ( a)
=e ( sin acos a )
2!
2
''

E4 = -EXP(L3) * (L3 - L4^2) * (B4*L1 - L2)^2 *

f ' ' ' ( x )=e sin x [ cos x2 (sin x ) ( cos x ) ] + ( sin xcos 2 x ) (e sin x ) ( cos x )

f ' ' ' ( x )=e sin x ( cos x +2 sin x cos x )esin x ( sin x cos xcos3 x )
f ' ' ' ( x )=e sin x ( cos x +3 sin x cos xcos3 x )=e sin x cos x ( 1+3 sin xcos 2 x )
f ' ' ' (a )

( xa )3
( xa )3
=e sina cos a ( 1+3 sin acos 2 a )
3!
6

F4 = -EXP(L3) * L4 * (1 + 3*L3 - L4^2) * (B4*L1 - L2)^3 * 1/6

IV

f ( x )=

d
[e sin x ( cos x +3 sin x cos xcos3 x ) ]
dx

f IV ( x )=e sin x [sin x+ 3 { sin x (sin x ) +cos x cos x }3 (sin x ) ( cos2 x ) ]+ ( cos x +3 sin x cos xcos3 x ) (e sin x ) cos x
f IV ( x )=e sin x (sin x+ 4 cos 2 x3sin 2 x +6 cos 2 x sin x3 cos 4 x )
f IV ( a )

( xa ) 4
( xa )4
=esin a ( sin a+ 4 cos 2 a3 sin 2 a+6 cos2 a sin a3 cos 4 a )
4!
24

G4 = -EXP(L3) * (-L3 + 4*L4^2 - 3*L3^2 + 6*L3*L4^2 - 3*L4^4) * (B4*L1 - L2)^4 * 1/24

L8 = EXP(L2)
L9 = L8^2
L10 = L8^3

L11 = L8^4
L12 = SIN(L8*L1)
L13 = COS(L8*L1)
L14 = (B5*L1 - L2)

4.
f ( x )=cos e x
I5 =COS(EXP(B5*L1)*L1)

( xa )2 ' ' ' ( x a )3 IV ( xa )4


f ( x )=f ( a ) +f ( a ) ( xa )+ f ( a )
+ f ( a)
+ f (a)
2!
3!
4!
'

''

H5 = C5 + D5 + E5 + F5 + G5

f ( x )=cos e x
f ( a )=cos e a
C5 = L13

f ' (x)=e sin e

'
a
a
f ( a ) ( xa )=e sin e ( x a )

D5 = -L8*L12 * L14

f ' ' ( x )=e x cos e x e x +sin e x (e x )=e 2 x cos e x e x sin e x


2
( xa )2
2a
a
a
a ( xa )
f ( a)
=( e cos e e sin e )
2!
2
''

E5 = (-L9*L13 - L8*L12) * (L14^2) * 1/2

f ' ' ' ( x )=e 2 x ( sin e x ) ( e x ) + cos e x ( e 2 x ) (2)e x cos e x e x +sin e x (e x )


f ' ' ' ( x)=e3 x sin e x 3 e2 x cos e x e x sin e x
f ' ' ' (a )

( xa )3
( xa )3
=( e3 a sin e a3 e 2 a cos ea e a sin ea )
3!
6

F5 = (L10*L12 - 3*L9*L13 - L8*L12) * (L14^3) * 1/6

f IV ( x )=e 3 x cos e x e x +sin e x e3 x ( 3 )3 {e 2 x (e x sin e x ) +cos e x ( e 2 x ) ( 2 ) }e x cos e x e x +sin e x (e x )


IV
4x
x
3x
x
2x
x
x
x
f ( x )=e cos e + 6 e sin e 7 e cos e e sin e

f IV ( a )

( xa ) 4
( xa )4
=( e 4 a cos e a +6 e 3 a sin ea 7 e2 a cos e aea sin e a )
4!
24

G5 = (L11*L13 + 6*L10*L12 - 7*L9*L13 - L8*L12) * (L14^4) * 1/24

You might also like