EBK NUMERICAL METHODS FOR ENGINEERS
EBK NUMERICAL METHODS FOR ENGINEERS
7th Edition
ISBN: 9780100254145
Author: Chapra
Publisher: YUZU
bartleby

Videos

Textbook Question
Book Icon
Chapter 2, Problem 14P

Two distances are required to specify the location of a point relative to an origin in two-dimensional space (Fig. P2.14):

The horizontal and vertical distances ( x ,   y ) inCartesian coordinates

The radius and angle ( r ,   θ ) in radial coordinates.

Chapter 2, Problem 14P, 2.14	Two distances are required to specify the location of a point relative to an origin in

FIGURE P2.14

It is relatively straight forward to compute Cartesian coordinates ( x ,   y ) on the basis of polar coordinates ( r ,   θ ) . The reverseprocess is not so simple. The radius can be computed by the following formula:

r = x 2 + y 2

If the coordinates lie within the first and fourth coordinates ( i .e . ,   x > 0 ) , then a simple formula can be used to compute θ

θ = tan 1 ( y x )

The difficulty arises for the other cases. The following table summarizes the possibilities:

x Y θ
< 0 >0 tan 1 ( y / x ) + π
< 0 < 0 tan 1 ( y / x ) π
< 0 = 0 π
= 0 >0 π / 2
= 0 < 0 π / 2
= 0 = 0 0

(a) Write a well-structured flowchart for a subroutine procedure to calculate r and θ as a function of x and y. Express the finalresults for θ in degrees.

(b) Write a well-structured function procedure based on your flowchart. Test your program by using it to fill out the following table:

x Y r θ
1 0
1 1
0 1
–1 1
–1 0
–1 –1
0 –1
1 –1
0 0

(a)

Expert Solution
Check Mark
To determine

A well-structured flowchart for a subordinate procedure to calculate r and θ as a function of x and y for the table given below, if two distances are required to specify the location of a point relative to an origin in two-dimensional space.

xyθ<0>0tan1(y/x)+π<0<0tan1(y/x)π<0=0π=0>0π/2=0<0π/2=0=00

Answer to Problem 14P

Solution:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  1

Explanation of Solution

Given Information:

To specify the location of a point relative to origin, cartesian coordinates (x,y) and polar coordinates (r,θ) are used.

Cartesian coordinates can be easily computed from the polar coordinates.

Polar coordinates are computed as follows:

r=x2+y2,θ=tan1(yx)

Formula used:

Calculation:

The flowchart for converting from Cartesian to polar coordinates is as follows

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  2

(b)

Expert Solution
Check Mark
To determine

A well-structured function procedure based on flowchart of part (a) if two distances are required to specify the location of a point relative to an origin in two-dimensional space. Also, test the program by filling the table given below:

xyrθ101101111011011100

Answer to Problem 14P

Solution:

The values of r and θ corresponding to provided x and y are:

xyrθ1010111.41424501190111.4142135101180111.41421350111111.4142450000

Explanation of Solution

Given Information:

To specify the location of a point relative to origin, cartesian coordinates (x,y) and polar coordinates (r,θ) are used.

Cartesian coordinates can be easily computed from the polar coordinates.

Polar coordinates are computed as follows:

r=x2+y2,θ=tan1(yx)

Calculation:

The MATLAB program for converting Cartesian to polar coordinates is as follows:

% Define a function polar()

function polar(x, y)

% Formula to calculate r

r = sqrt (x.^ 2+ y.^ 2);

if x > 0

% Formula to calculate theta

th= atan(y/ x);

elseif x < 0

% Use for loop to check the condition

if y > 0

th= atan(y / x)+ pi;

elseif y < 0

th= atan(y / x)- pi;

else

th= pi;

end

else

if y > 0

th= pi / 2;

elseif y < 0

th=- pi / 2;

else

th= 0;

end

end

theta = th* 180 / pi;

% Display the polar coordinates

fprintf('r = %4.4f theta = %4.2f\n',r,theta);

Now, to test the program use the following command.

First find polar coordinates for x=1,y=0.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  3

Now, for polar coordinates for x=1,y=1.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  4

Now, for polar coordinates for x=0,y=1.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  5

Now, forpolar coordinates for x=1,y=1.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  6

Now, forpolar coordinates for x=1,y=0.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  7

Now, forpolar coordinates for x=1,y=1.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  8

Now, forpolar coordinates for x=0,y=1.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  9

Now, forpolar coordinates for x=1,y=1.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  10

Now, forpolar coordinates for x=0,y=0.

OUTPUT:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 2, Problem 14P , additional homework tip  11

Hence, the values of r and θ corresponding to provided x and y are:

xyrθ1010111.41424501190111.4142135101180111.41421350111111.4142450000

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
1. Prove the following arguments using the rules of inference. Do not make use of conditional proof. (а) а → (ЪЛс) ¬C ..¬a (b) (pVq) → →r יור (c) (c^h) → j ¬j h (d) s→ d t d -d ..8A-t (e) (pVg) (rv¬s) Лѕ קר .'
2. Consider the following argument: (a) Seabiscuit is a thoroughbred. Seabiscuit is very fast. Every very fast racehorse can win the race. .. Therefore, some thoroughbred racehorse can win the race. Let us define the following predicates, whose domain is racehorses: T(x) x is a thoroughbred F(x) x is very fast R(x) x can win the race : Write the above argument in logical symbols using these predicates. (b) Prove the argument using the rules of inference. Do not make use of conditional proof. (c) Rewrite the proof using full sentences, avoiding logical symbols. It does not need to mention the names of rules of inference, but a fellow CSE 16 student should be able to understand the logical reasoning.
Find the inverse of the matrix, or determine that the inverse does not exist for: € (b) 7 -12 240 1 1 1 (c) 2 3 2 2 17 036 205 20 (d) -1 1 2 1 T NO 1 0 -1 00 1 0 02 (e) 1 0 00 0 0 1 1

Chapter 2 Solutions

EBK NUMERICAL METHODS FOR ENGINEERS

Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781337278461
Author:Ron Larson
Publisher:Cengage Learning
Chain Rule dy:dx = dy:du*du:dx; Author: Robert Cappetta;https://www.youtube.com/watch?v=IUYniALwbHs;License: Standard YouTube License, CC-BY
CHAIN RULE Part 1; Author: Btech Maths Hub;https://www.youtube.com/watch?v=TIAw6AJ_5Po;License: Standard YouTube License, CC-BY