Você está na página 1de 3

Assignment 1

1. Submitted by:
a. Name : ABHINANDAN YADAV
b. Roll# : PH16MSCST11001
c. Dept: Physics
2. Problem statement:
a. Evaluate f and f over a given interval using the three point and five point
formula
and calculate the error using the function derivative computed analytically.
3. Summary:
a. Our f(x) is sine function. First, we compute all the values sine takes over a
fixed
interval, .viz [0,PI/2].
b. We then compute the first and second derivative using the three point and
five
point formula.
c. Since, we know the first and second derivative of sine function, .viz cosine
and
sine
respective. We evaluate using the builtin functions and using these we
compute the absolute error.
d. At boundary values, I passed 0.
4. Execution/Compiler:
a. I coded my entire program in Python. It uses matplotlib library to plot the
graphs.
Hence, it uses Python compiler.
5. Data.out:
a. My program doesnt take any data.in files. I compute the x range myself in
the
program.
b. There are two data.out files, both of which are in CSV format. This helps in
importing into Excel or any other spreadsheet program easy.
i. out_fdash.csv
ii. out_fdoubledash.csv
6. Error analysis:
Fn
Max Abs Err
Sum of Abs err
F(3points)
4.11179633886e05
0.00259670664548
F(5points)
4.11179633886e05
1.26047828897e07
F(3points)
2.05514597558e05
0.00127812725791
F(5points)
6.7605077092e10
4.13593206627e08

a.

Você também pode gostar