# Estimating an Error Function from a Taylor Series

#### Jewgro

##### New Member
Hi,

Using Excel 2010, I am attempting to estimate the following error function using a Taylor Series when x = 1:

imgur: the simple image sharer

I am trying to find how many " n " terms I need to sum over the function to attain/estimate the value of erf(1). The only tools I can use in excel are the SUM() function and the Goal Seek/Solver add-in.

Any help would be much appreciated!

### Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

#### Worf

##### Well-known Member
Hi and welcome to the Board
Here is an idea:
- Column A = n
- Column B = corresponding term
- Column C = error function with n terms
- Column D = difference between last two terms, when very small you can consider that the function has stabilized.
It seems that a good answer would be n=13.

Sheet2

 * A B C D 1 n term erf finished? 2 0 1,12838 1,12838 * 3 1 -3,38514 -2,25676 FALSE 4 2 2,82095 0,56419 FALSE 5 3 -1,316443333 -0,752253333 FALSE 6 4 0,4231425 -0,329110833 FALSE 7 5 -0,103434833 -0,432545667 FALSE 8 6 0,020373528 -0,412172139 FALSE 9 7 -0,003358274 -0,415530413 FALSE 10 8 0,000475755 -0,415054657 FALSE 11 9 -5,90807E-05 -0,415113738 FALSE 12 10 6,52998E-06 -0,415107208 FALSE 13 11 -6,50171E-07 -0,415107858 FALSE 14 12 5,88923E-08 -0,415107799 TRUE 15 13 -4,89259E-09 -0,415107804 TRUE 16 14 3,75357E-10 -0,415107804 TRUE 17 15 -2,67496E-11 -0,415107804 TRUE

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:90px;"><col style="width:101px;"><col style="width:76px;"></colgroup><tbody>
</tbody>

 Cell Formula B2 =(1.12838*POWER(-1,A2)/FACT(A2)*(2*A2+1)) C2 =SUM(B2) B3 =(1.12838*POWER(-1,A3)/FACT(A3)*(2*A3+1)) C3 =SUM(C2,B3) D3 =IF(ABS(C3-C2)<0.0000001,"TRUE","FALSE") B4 =(1.12838*POWER(-1,A4)/FACT(A4)*(2*A4+1)) C4 =SUM(C3,B4) D4 =IF(ABS(C4-C3)<0.0000001,"TRUE","FALSE") B5 =(1.12838*POWER(-1,A5)/FACT(A5)*(2*A5+1)) C5 =SUM(C4,B5) D5 =IF(ABS(C5-C4)<0.0000001,"TRUE","FALSE") B6 =(1.12838*POWER(-1,A6)/FACT(A6)*(2*A6+1)) C6 =SUM(C5,B6) D6 =IF(ABS(C6-C5)<0.0000001,"TRUE","FALSE") B7 =(1.12838*POWER(-1,A7)/FACT(A7)*(2*A7+1)) C7 =SUM(C6,B7) D7 =IF(ABS(C7-C6)<0.0000001,"TRUE","FALSE") B8 =(1.12838*POWER(-1,A8)/FACT(A8)*(2*A8+1)) C8 =SUM(C7,B8) D8 =IF(ABS(C8-C7)<0.0000001,"TRUE","FALSE") B9 =(1.12838*POWER(-1,A9)/FACT(A9)*(2*A9+1)) C9 =SUM(C8,B9) D9 =IF(ABS(C9-C8)<0.0000001,"TRUE","FALSE") B10 =(1.12838*POWER(-1,A10)/FACT(A10)*(2*A10+1)) C10 =SUM(C9,B10) D10 =IF(ABS(C10-C9)<0.0000001,"TRUE","FALSE") B11 =(1.12838*POWER(-1,A11)/FACT(A11)*(2*A11+1)) C11 =SUM(C10,B11) D11 =IF(ABS(C11-C10)<0.0000001,"TRUE","FALSE") B12 =(1.12838*POWER(-1,A12)/FACT(A12)*(2*A12+1)) C12 =SUM(C11,B12) D12 =IF(ABS(C12-C11)<0.0000001,"TRUE","FALSE") B13 =(1.12838*POWER(-1,A13)/FACT(A13)*(2*A13+1)) C13 =SUM(C12,B13) D13 =IF(ABS(C13-C12)<0.0000001,"TRUE","FALSE") B14 =(1.12838*POWER(-1,A14)/FACT(A14)*(2*A14+1)) C14 =SUM(C13,B14) D14 =IF(ABS(C14-C13)<0.0000001,"TRUE","FALSE") B15 =(1.12838*POWER(-1,A15)/FACT(A15)*(2*A15+1)) C15 =SUM(C14,B15) D15 =IF(ABS(C15-C14)<0.0000001,"TRUE","FALSE") B16 =(1.12838*POWER(-1,A16)/FACT(A16)*(2*A16+1)) C16 =SUM(C15,B16) D16 =IF(ABS(C16-C15)<0.0000001,"TRUE","FALSE") B17 =(1.12838*POWER(-1,A17)/FACT(A17)*(2*A17+1)) C17 =SUM(C16,B17) D17 =IF(ABS(C17-C16)<0.0000001,"TRUE","FALSE")

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web >> Excel Jeanie HTML 4

#### Jewgro

##### New Member

I was able to find out the answer using a similar method and it turned out that your answer and mine were very similar . I obtained a value of n = 14.

Cheers.

Replies
1
Views
91
Replies
7
Views
151
Replies
4
Views
85
Replies
1
Views
239
Replies
0
Views
52

1,195,662
Messages
6,010,999
Members
441,579
Latest member
satishrazdhan

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back