(a) Which of the two mathematically equivalent expressions
x2 − y2 and (x − y)(x + y)
can be evaluated more accurately in floating-point arithmetic?
Why?
The squaring of a floating point number may lead to round
off error, as the decimal part
in the result will have more digits. And of course, after that the
subtraction will loose
some digits when handling extremely skewed floating point numbers.
So, x2 - y2 may lead
to more rounding errors.
Where as, on the other hand, (x-y)(x+y) will relatively be
preferred to the previous one.
Even though this operation is also having multiplication involved
in it, the subtraction
before the multiplication will do less harm
relatively.
For what values of x and y, relative to each other, is there a
substantial difference in the accuracy of the two
expressions?
Computing the exact difference or sum of two floating
point numbers can be very expensive
when their exponents are substantially different. Therefore, when
the exponents are
substantially high, the x, and y value will have substantial
difference in their accuracy.
Which of the two mathematically equivalent expressions, 2 -y2 and (+) (-y), can be evaluated Which of the two mathematically equivalent expressions, r2y and (r+y) (r-y), can be evaluated more accurat...
Saving... r Question 4 of 20 > Which two expressions are equivalent to the simplified and un-simplified sum of 8x-5 x2+2x-3 and 8-7X 2+2x-3 ? There are two correct answers. Be sure to select both of them. x+3 2x2 +47-6 x2+2x-3 3x-1 O 2x-2
Please answer this question in both mathematically and with R. I need R code also.. Its urgent... 3.14 For the variables in Table 3.4, define z 3y1 y2 2y3 (3,-1,2)y. Find z and sz in two ways: (a) Evaluate z for each row of Table 3.4 and find Z and s directly from 21,22,., 210 using (3.1) and (3.5). (b) Use za'y and s2- a'Sa, as in (3.54) and (3.55). The sample mean of a random sample of n observations...
EVALUATING GENERAL INFIX EXPRESSIONS INTRODUCTION The notation in which we usually write arithmetic expressions is called infix notation; in it, operators are written between their operands: X + Y. Such expressions can be ambiguous; do we add or multiply first in the expression 5 + 3 * 2? Parentheses and rules of precedence and association clarify such ambiguities: multiplication and division take precedence over addition and subtraction, and operators associate from left to right. This project implements and exercises a stack-based algorithm that evaluates...
Please prove this solution and explain why y2 can be taken as (x^2)(y1) Problem 2. Find the general solution of the equation Note that one of two linearly independent solutions is yi(r) -e. Solution. Using Abel's formula, we get the following relations for the Wronskian dW pi dW 2r1 On the other hand, Comparing these two expression for W(x), we can take y2 :- r2yı. Correspondingly, the general solution is Problem 2. Find the general solution of the equation Note...
#10 and #12 8. Find all points (.y) where fCx.y) -3x2 + 7xy -4y2 + x + y has possible relative maximum or minimum values 9. Find all points (x,y, z) where f(x,y,z) 5+ 8x 4y+x2+y2 z2has possible relativema imun or minimum value 10. Both first partial derivatives of f(x.y)-x-4xyy are zero at the points (0 11. Find all points (x,y) where f(e.y) 2x2+3xy + 5y has possible relative maximum or minimum values. Then, use the 12. Use the second...
Question 2 (30 points) Integrate f(x, y,2) xzv2-z2 - y2 over the path C, which consists of two curves, C1 and C2 from (1, 0, 0) to (1,0, 0), then to (-1,3, 0). Curve C1 is only half of the circle2 Curve C2 is a straight-line segment. The parametric equation for G is G: r! (t)-cos t î + sin t k, 0 π Find the line integral: Jcf(x. y,z)ds - (25 points) C2 (-1,3,0) Question 2 (30 points) Integrate...
Suppose is a closed curve in the plane and that -Y dr + 2? + y2 2 dy = 671 z? + y2 How many self-intersection points must have, at least? By "self-intersection point", I mean a point where the curve intersects itself other than its endpoints. For example, a simple closed curve has zero self-intersection points, and a figure 8 has one self-intersection point. Hint: If a curve has self-intersection points, then it can be divided up into a...
6. (a) Newton's method for approximating a root of an equation f(x) 0 (see Section 3.8) can be adapted to approximating a solution of a system of equations f(x, y) 0 and gx, y) 0. The surfaces z f(x, y) and z g(x, y) intersect in a curve that intersects the xy-plane at the point (r, s), which is the solution of the system. If an initial approxi- mation (xi, yı) is close to this point, then the tangent planes...
8. (Extra Credits: You can get up to 60% more!) A grid in Cartesian coordinates with size 6 x 4 is shown in Figure 2a. We start from the original point (0,0) and repeat moving 1 unit length to the next grid point by either moving up (denoted as U-action or right (denoted as R-action), until we reach the destination point (6,4). Each sequence of such R- and U-actions forms a path. Figure 2b shows an example path of this...
How to solve #7 Suppose that /(x,y)=(x+y2)3. Find s. and at the port az) , supportait atturbanco nennt.yoy, tindhaw.th.he%.anda 7. in a certain suburban community, commuters have the choice of geting into the ity by bus or train. The demand for these modes of transportation variles with their cost Let /(P.,P) be the number of people who will take the train when p, i the price of the bus ride and py is the price of the train ride. Would...