EBK NUMERICAL METHODS FOR ENGINEERS
EBK NUMERICAL METHODS FOR ENGINEERS
7th Edition
ISBN: 8220100254147
Author: Chapra
Publisher: MCG
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
please work out more details give the solution.
Burger Dome sells hamburgers, cheeseburgers, french fries, soft drinks, and milk shakes, as well as a limited number of specialty items and dessert selections. Although Burger Dome would like to serve each customer immediately, at times more customers arrive than can be handled by the Burger Dome food service staff. Thus, customers wait in line to place and receive their orders. Burger Dome analyzed data on customer arrivals and concluded that the arrival rate is 30 customers per hour. Burger Dome also studied the order-filling process and found that a single employee can process an average of 44 customer orders per hour. Burger Dome is concerned that the methods currently used to serve customers are resulting in excessive waiting times and a possible loss of sales. Management wants to conduct a waiting line study to help determine the best approach to reduce waiting times and improve service. Suppose Burger Dome establishes two servers but arranges the restaurant layout so that an…
Note: A waiting line model solver computer package is needed to answer these questions. The Kolkmeyer Manufacturing Company uses a group of six identical machines, each of which operates an average of 18 hours between breakdowns. With randomly occurring breakdowns, the Poisson probability distribution is used to describe the machine breakdown arrival process. One person from the maintenance department provides the single-server repair service for the six machines. Management is now considering adding two machines to its manufacturing operation. This addition will bring the number of machines to eight. The president of Kolkmeyer asked for a study of the need to add a second employee to the repair operation. The service rate for each individual assigned to the repair operation is 0.50 machines per hour. (a) Compute the operating characteristics if the company retains the single-employee repair operation. (Round your answers to four decimal places. Report time in hours.) La = L = Wa = W =…

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