c lab question 1

1
COMPUTATION LAB EXERCISE 1 1. The finite series () = ∑ 1 2 =1 converges on a value of f(N) = 2 6 as N approaches infinity. Write a program to compute f(N) for N = 10000 by computing the sum from n = 1 to 10000. Then repeat the computation but in reverse order using increment of -1. Find true percent relative error. Hint: 1. initialise f(N) = 0 2. put n=1 3. f(N)=f(N)+ 1 2 4. n=n+1, check whether n>10000, if not go to step 3 Do the same step by initialising n = 10000 and giving a decrement 1 (or increment -1) True percent relative error = True error = true value - approximation 2. The Stefan Boltzmann law can be employed to estimate the rate of radiation of energy H from a surface as in = σ 4 where H is in watts, A, the surface area ( 2 ), e, the emissivity that characterizes the emitting properties of the surface, σ, Stefan Boltzmann constant (= 5.67*10^(-8) W/m 2 K 4 ) and T, absolute temperature(K). Determine the error of H for a steel plate with A = .15 2 e = 0.9 and T = 650 ± 25. Compare your results with the exact error. Repeat the computation with T = 650 ± 50 Hint: 1. Error, 2. . 3. Find for ΔT=25 and 50 4. Exact error = (maximum value minimum value)/2

Upload: ravivaidya

Post on 18-Aug-2015

216 views

Category:

Documents


1 download

DESCRIPTION

LAB

TRANSCRIPT

COMPUTATION LAB EXERCISE 1 1.The finite series () = 1

2

=1 converges on a value of f(N) =

26 as N approaches infinity.Write a program to compute f(N)for N = 10000 by computing the sum from n = 1 to 10000. Then repeat the computation but in reverse order using increment of -1. Find true percent relative error. Hint: 1.initialise f(N) = 02.put n=1 3.f(N)=f(N)+ 1

2 4.n=n+1, check whether n>10000, if not go to step 3 Do the same step by initialising n = 10000 and giving a decrement 1 (or increment -1) True percent relative error =

True error = true value - approximation 2.TheStefanBoltzmannlawcanbeemployedtoestimatetherateof radiation of energy H from a surface as in = 4 where H is in watts, A, the surface area (2), e, the emissivity that characterizes the emitting propertiesofthesurface,,StefanBoltzmannconstant(=5.67*10^(-8) W/m2K4) and T, absolute temperature(K). Determine the error of H for a steel plate with A = .15 2 e = 0.9 and T = 650 25. Compare your results with the exact error. Repeat the computation with T = 650 50 Hint: 1.Error, 2.. 3.Find for T=25 and 50 4.Exact error = (maximum value minimum value)/2