
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

f (x, y) =
x + y x ≥ 0 and y ≥ 0 x + y^2 x ≥ 0 and y < 0 x^2 + y x < 0 and y ≥ 0 x^2 + y^2 x < 0 and y < 0
x =
∑N i=1 xi N
x 1 + x 2 + x 3 +... + xn N
σ =
√√ √√
(∑ N i=1 x 2 i
) − N x^2 N − 1
Write a program that iteratively reads positive numbers from the input, and that prints out the number of elements read, their mean, and standard de- viation; the sequence should be terminated with a negative number. Try it with the following sequence of numbers: 1 9 34 23 24 8 7 15 17 19 22 21 16 27.
π
( 1 2
) ( 1 2
√ 2 +
) 1 2
√ 2 +
√ 2 +
1 2
√
2 +
√ 2 +
√ 2 +
...
Write a program that computes the value of π according to the formula above. Include as many terms as necessary so that the change in the accumulated value is less then 10−^5.
∫ (^1) 0
∫ xdx, 2 0 sin
(^2) πx (^2) dx, and ∫^4 0 f^ (x)dx^ where^ f^ =^ x (^2) for x < 1 and f = e−(x−1) (^) for x > 1.