Diseno en ingenieria mecanica de Shigley - 8th ---HDes
descarga el contenido completo de aqui http://paralafakyoumecanismos.blogspot.com.ar/2014/08/libro-para-mecanismos-y-elementos-de.html
Department of MathematicsMTL107 Numerical Methods and Com.docxsalmonpybus
Department of Mathematics
MTL107: Numerical Methods and Computations
Exercise Set 8: Approximation-Linear Least Squares Polynomial approximation, Chebyshev
Polynomial approximation.
1. Compute the linear least square polynomial for the data:
i xi yi
1 0 1.0000
2 0.25 1.2840
3 0.50 1.6487
4 0.75 2.1170
5 1.00 2.7183
2. Find the least square polynomials of degrees 1,2 and 3 for the data in the following talbe.
Compute the error E in each case. Graph the data and the polynomials.
:
xi 1.0 1.1 1.3 1.5 1.9 2.1
yi 1.84 1.96 2.21 2.45 2.94 3.18
3. Given the data:
xi 4.0 4.2 4.5 4.7 5.1 5.5 5.9 6.3 6.8 7.1
yi 113.18 113.18 130.11 142.05 167.53 195.14 224.87 256.73 299.50 326.72
a. Construct the least squared polynomial of degree 1, and compute the error.
b. Construct the least squared polynomial of degree 2, and compute the error.
c. Construct the least squared polynomial of degree 3, and compute the error.
d. Construct the least squares approximation of the form beax, and compute the error.
e. Construct the least squares approximation of the form bxa, and compute the error.
4. The following table lists the college grade-point averages of 20 mathematics and computer
science majors, together with the scores that these students received on the mathematics
portion of the ACT (Americal College Testing Program) test while in high school. Plot
these data, and find the equation of the least squares line for this data:
:
ACT Grade-point ACT Grade-point
score average score average
28 3.84 29 3.75
25 3.21 28 3.65
28 3.23 27 3.87
27 3.63 29 3.75
28 3.75 21 1.66
33 3.20 28 3.12
28 3.41 28 2.96
29 3.38 26 2.92
23 3.53 30 3.10
27 2.03 24 2.81
5. Find the linear least squares polynomial approximation to f(x) on the indicated interval
if
a. f(x) = x2 + 3x+ 2, [0, 1]; b. f(x) = x3, [0, 2];
c. f(x) = 1
x
, [1, 3]; d. f(x) = ex, [0, 2];
e. f(x) = 1
2
cosx+ 1
3
sin 2x, [0, 1]; f. f(x) = x lnx, [1, 3];
6. Find the least square polynomial approximation of degrees 2 to the functions and intervals
in Exercise 5.
7. Compute the error E for the approximations in Exercise 6.
8. Use the Gram-Schmidt process to construct φ0(x), φ1(x), φ2(x) and φ3(x) for the following
intervals.
a. [0,1] b. [0,2] c. [1,3]
9. Obtain the least square approximation polynomial of degree 3 for the functions in Exercise
5 using the results of Exercise 8.
10. Use the Gram-Schmidt procedure to calculate L1, L2, L3 where {L0(x), L1(x), L2(x), L3(x)}
is an orthogonal set of polynomials on (0,∞) with respect to the weight functions w(x) =
e−x and L0(x) = 1. The polynomials obtained from this procedure are called the La-
guerre polynomials.
11. Use the zeros of T̃3, to construct an interpolating polynomial of degree 2 for the following
functions on the interval [-1,1]:
a. f(x) = ex, b. f(x) = sinx, c. f(x) = ln(x+ 2), d. f(x) = x4.
12. Find a bound for the maximum error of the approximation in Exercise 1 on the interval
[-1,1].
13. Use the zer.
Diseno en ingenieria mecanica de Shigley - 8th ---HDes
descarga el contenido completo de aqui http://paralafakyoumecanismos.blogspot.com.ar/2014/08/libro-para-mecanismos-y-elementos-de.html
SolutionsPlease see answer in bold letters.Note pi = 3.14.docxrafbolet0
Solution
s:
Please see answer in bold letters.
Note pi = 3.1415….
1. The voltage across a 15Ω is as indicated. Find the sinusoidal expression for the current. In addition, sketch the v and i waveform on the same axis.
Note: For the graph of a and b please see attached jpg photo with filename 1ab.jpg and for c and d please see attached photo with filename 1cd.jpg.
a. 15sin20t
v= 15sin20t
By ohms law,
i = v/r
i = 15sin20t / 15
i = sin20t A
Computation of period for graphing:
v= 15sin20t
i = sin20t
w = 20 = 2pi*f
f = 3.183 Hz
Period =1/f = 0.314 seconds
b. 300sin (377t+20)
v = 300sin (377t+20)
i = 300sin (377t+20) /15
i = 20 sin (377t+20) A
Computation of period for graphing:
v = 300sin (377t+20)
i = 20 sin (377t+20)
w = 377 = 2pi*f
f = 60 Hz
Period = 1/60 = 0.017 seconds
shift to the left by:
2pi/0.017 = (20/180*pi)/x
x = 9.44x10-4 seconds
c. 60cos (wt+10)
v = 60cos (wt+10)
i = 60cos (wt+10)/15
i = 4cos (wt+10) A
Computation of period for graphing:
let’s denote the period as w sifted to the left by:
10/180*pi = pi/18
d. -45sin (wt+45)
v = -45sin (wt+45)
i = -45sin (wt+45) / 15
i = -3 sin (wt+45) A
Computation of period for graphing:
let’s denote the period as w sifted to the left by:
45/180 * pi = 1/4*pi
2. Determine the inductive reactance (in ohms) of a 5mH coil for
a. dc
Note at dc, frequency (f) = 0
Formula: XL = 2*pi*fL
XL = 2*pi* (0) (5m)
XL = 0 Ω
b. 60 Hz
Formula: XL = 2*pi*fL
XL = 2 (60) (5m)
XL = 1.885 Ω
c. 4kHz
Formula: XL = 2*pi*fL
XL = = 2*pi* (4k)(5m)
XL = 125.664 Ω
d. 1.2 MHz
Formula: XL = 2*pi*fL
XL = 2*pi* (1.2 M) (5m)
XL = 37.7 kΩ
3. Determine the frequency at which a 10 mH inductance has the following inductive reactance.
a. XL = 10 Ω
Formula: XL = 2*pi*fL
Express in terms in f:
f = XL/2 pi*L
f = 10 / (2pi*10m)
f = 159.155 Hz
b. XL = 4 kΩ
f = XL/2pi*L
f = 4k / (2pi*10m)
f = 63.662 kHz
c. XL = 12 kΩ
f = XL/2piL
f = 12k / (2pi*10m)
f = 190.99 kHz
d. XL = 0.5 kΩ
f = XL/2piL
f = 0.5k / (2pi*10m)
f = 7.958 kHz
4. Determine the frequency at which a 1.3uF capacitor has the following capacitive reactance.
a. 10 Ω
Formula: XC = 1/ (2pifC)
Expressing in terms of f:
f = 1/ (2pi*XC*C)
f = 1/ (2pi*10*1.3u)
f = 12.243 kΩ
b. 1.2 kΩ
f = 1/ (2pi*XC*C)
f = 1/ (2pi*1.2k*1.3u)
f = 102.022 Ω
c. 0.1 Ω
f = 1/ (2pi*XC*C)
f = 1/ (2pi*0.1*1.3u)
f = 1.224 MΩ
d. 2000 Ω
f = 1/ (2pi*XC*C)
f = 1/ (2pi*2000*1.3u)
f = 61.213 Ω
5. For the following pairs of voltage and current, indicate whether the element is a capacitor, an inductor and a capacitor, an inductor, or a resistor and find the value of C, L, or R if insufficient data are given.
a. v = 55 sin (377t + 50)
i = 11 sin (377t -40)
Element is inductor
In this case voltage leads current (ELI) by exactly 90 degrees so that means the circuit is inductive and the element is inductor.
XL = 55/11 = 5 Ω
we know the w=2pif so
w= 377=2pif
f= 60 Hz
To compute for th.
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
1. Instructor’s Manual c
to accompany
Introduction to Matlab 6 for Engineers
by
William J. Palm III
University of Rhode Island
c Instructor’s Manual Copyright 2000 by McGraw-Hill Companies, Inc.
0-1
2. Solutions to Problems in Chapter One
Test Your Understanding Problems
T1.1-1 a) 6*10/13 + 18/(5*7) + 5*9^2. Answer is 410.1297.
b) 6*35^(1/4) + 14^0.35. Answer is 17.1123.
T1.3-1 The session is:
x = [[cos(0):0.02:log10(100)];
length(x)
ans =
51
x(25)
ans =
1.4800
T1.3-2 The session is:
roots([1, 6, -11, 290]
ans =
-10.000
2.0000 + 5.0000i
2.0000 - 5.0000i
poly(ans)
ans =
1.0000 6.0000 -11.0000 290.0000
which are the given coefficients. Thus the roots are −10 and 2 ± 5i.
T1.3-3 a) z = 0 0 1 1 1
b) z = 1 0 0 0 0
c) z = 1 0 1 1 1
d) z = 0 0 0 0 1
T1.3-4 The session is:
x = [-4, -1, 0, 2, 10];y = [-5, -2, 2, 5, 9];
x(x>y)
ans =
-4 -1 10
find(x>y)
ans =
1 2 5
1-1
3. T1.3-5 The session is:
t = [0:0.01:5];
s = 2*sin(3*t+2) + sqrt(5*t+1);
plot(t,s),xlabel( Time (sec) ),ylabel( Speed (ft/sec) )
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
1
2
3
4
5
6
7
Time t (sec)
Speeds(ft/sec)
Figure : for Problem T1.3-5
T1.3-6 The session is:
x = [0:0.01:1.55];
s = 4*sqrt(6*x+1);
z = polyval([4,6,-5,3],x);
plot(x,y,x,z, -- ),xlabel( Distance (meters) ),ylabel( Force (newtons)
T1.3-7 The session is:
A = [6, -4, 8; -5, -3, 7; 14, 9, -5];
b = [112; 75; -67];
x = Ab
1-2
4. 0 0.5 1 1.5
0
5
10
15
20
25
Distance x (meters)
Force(newtons)
y
z
Figure : for Problem T1.3-6
x =
2.0000
-5.0000
10.0000
A*x
ans =
112 75 -67
Thus the solution is x = 2, y = −5, and z = 10.
T1.4-1 The session is:
a = 112; b = 75; c = -67;
A = [6, -4, 8; -5, -3, 7; 14, 9, -5];
bvector = [a; b; c];
x = Abvector
x =
2.0000
-5.0000
10.0000
1-3
5. A*x
ans =
112 75 -67
Thus the solution is x = 2, y = −5, and z = 10.
T1.4-2 The script file is:
x = -5;
if x < 0
y = sqrt(x^2+1)
elseif x < 10
y = 3*x+1
else
y = 9*sin(5*x-50)+31
end
For x = −5, y = 5.0990. Changing the first line to x = 5 gives y = 16. Changing the first
line to x = 15 gives y = 29.8088.
T1.4-3 The script file is
sum = 0;
for k = 1:20
sum = sum + 3*k^2;
end
sum
The answer is sum = 8610.
T1.4-4 The script file is
sum = 0;k = 0;
while sum <= 2000
k = k + 1;
sum = sum + 3*k^2;
end
k
sum
The answers are k = 13 and sum = 2457.
End-of-Chapter Problems
1. The session is:
1-4
6. x = 10; y = 3;
u = x + y
u =
13
v = x*y
v =
30
w = x/y
w =
3.3333
z = sin(x)
z =
-0.5440
r = 8*sin(y)
r =
1.1290
s = 5*sin(2*y)
s =
-1.3971
2. The session is:
y*x^3/(x-y)
ans =
-13.3333
3*x/(2*y)
ans =
0.6000
3*x*y/2
ans =
15
x^5/(x^5-1)
ans =
1.0323
3. The session is:
x = 3; y = 4;
1/(1-1/x^5)
ans =
1.0041
3*pi*x^2
1-5
7. ans =
84.8230
3*y/(4*x-8)
ans =
3
4*(y-5)/(3*x-6)
ans =
-1.3333
4. a) x = 2;y = 6*x^3 + 4/x. The answer is y = 50.
b) x = 8;y = (x/4)*3. The answer is y = 6.
c) x = 10;y = (4*x)^2/25. The answer is y = 64.
d) x = 2;y = 2*sin(x)/5. The answer is y = 0.3637.
e) x = 20;y = 7*x^(1/3) + 4*x^0.58. The answer is y = 41.7340.
5. The session is:
a = 1.12; b = 2.34; c = 0.72;d = 0.81;f = 19.83;
x = 1 + a/b + c/f^2
x =
1.4805
s = (b-a)/(d-c)
s =
13.556
r = 1/(1/a + 1/b + 1/c + 1/d)
r =
0.2536
y = a*b/c*f^2/2
y =
715.6766
6. The session is:
r = 5;
V = 4*pi*^3/4;
V = 1.3*V;
r = ((3*V)/(4*pi))^(1/3);
r =
4.9580
The required radius is 4.958.
1-6
8. 7. The session is
x = -7-5i;y = 4+3i;
x+y
ans =
-3.0000 - 2.0000i
x*y
ans =
-13.0000 -41.0000i
x/y
ans =
-1.7200 + 0.0400i
8. The session is:
(3+6i)*(-7-9i)
ans =
33.0000 -69.0000i
(5+4i)/(5-4i)
ans =
0.2195 + 0.9756i
3i/2
ans =
0 + 1.5000i
3/2i
ans =
0 - 1.5000i
9. The session is:
x = 5+8i;y = -6+7i;
u = x + y;v = x*y;
w = x/y;z = exp(x)
r = sqrt(y);s = x*y^2;
The answers are u = −1+51i, v = −86−13i, w = 0.3059−0.9765i, z = −21.594+146.83i,
r = 1.2688 + 2.7586i, and s = 607 − 524i.
10. The session is:
n = 1;R = 0.08206;T = 273.2;V=22.41;
a = 6.49;b = 0.0562;
Pideal = n*R*T/V
1-7
9. Pideal =
1.0004
P1 = n*R*T/(V - nb)
P1 =
1.0029
P2 = (a*n^2)/V^2
P2 =
0.0129
Pwaals = P1 + P2
Pwaals =
1.0158
The ideal gas law predicts a pressure of 1.0004 atmospheres, while the van der Waals model
predicts 1.0158 atmospheres. Most of the difference is due to the P2 term, which models
the molecular attractions.
11. The ideal gas law gives
T
V
=
P
nR
= constant
Thus T1/V1 = T2/V2, or V2 = V1T2/T1. The session is:
V1 = 28500;T1 = 273.2 - 15;T2 = 273.2 + 31;
V2 = V1*T2/T1
V2 =
3.3577e+4
The volume is 3.3577 × 104 ft3.
12. The session is:
x=[1:.2:5];
y = 7*sin(4*x)
y =
Columns 1 through 7
-5.2976 -6.9732 -4.4189 0.8158 5.5557 6.9255 4.0944
Columns 8 through 14
-1.2203 -5.7948 -6.8542 -3.7560 1.6206 6.0141 6.7596
Columns 15 through 21
3.4048 -2.0153 -6.2130 -6.6419 -3.0420 2.4032 6.3906
y(3)
ans =
-4.4189
1-8
10. There are 21 elements. The third element is −4.4189.
13. The session is:
x = [sin(-pi/2):0.05:cos(0)];
length(x)
ans =
41
x(10)
ans =
0.5500
There are 41 elements. The tenth element is 0.55.
14. The session is:
p = ([13,182,-184,2503];
r = roots(p)
r =
-15.6850
0.8425 + 3.4008i
0.8425 - 3.4008i
polyval(p,r)
ans =
1.0e-012 *
0.1137 - 0.0001i
0 - 0.0002i
0
The roots are x = −15.685 and x = 0.8425 ± 3.4008i. When these roots are substituted
into the polynomial, we obtain values close to zero, as they should be.
15. The session is:
p = [36, 12, -5, 10];
roots(p)
ans =
-0.8651
0.2659 + 0.5004i
0.2659 - 0.5004i
The roots are −0.8651 and 0.2659 ± 0.5004i. Typing polyval(p,ans) returns three values
that are close to zero. This confirms that the roots satisfy the equation 36x3 + 12x2 − 5x +
10 = 0.
1-9
11. 16. The session is:
r = [3+6i,3-6i,8,8,20];
p = poly(r)
p =
1 -42 645 -5204 24960 -57600
roots(p)
ans =
20.0000
3.0000 + 6.0000i
3.0000 - 6.0000i
8.0000
8.0000
Because the roots command returns the same roots as those given, the answer is correct.
It is x5 − 42x4 + 645x3 − 5204x2 + 24, 960x − 57, 600.
17. No solution is needed.
18. a) z = 0 1 0 0 1 b) z = 1 0 1 0 0
c) z = 1 1 1 0 1 d) z = 0 0 0 1 0
e) z = 0 0 1 1 1
19. The session is:
x = [-15, -8, 9, 8, 5];y = [-20, -12, 4, 8, 9];
x(x>y)
ans =
-15 9
find(x>y)
ans =
1 3
The first and third elements of x are greater than the first and third elements of y.
20. The session is:
t = [1:0.005:3];
T = 6*log(t) - 7*exp(-0.2*t);
plot(t,T),title( Temperature Versus Time ),...
xlabel( Time t (minutes) ),ylabel( Temperature T (◦ C) )
The plot is shown in the figure.
1-10
12. 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3
−6
−5
−4
−3
−2
−1
0
1
2
3
Time t (minutes)
TemperatureT(
o
C)
Temperature Versus Time
Figure : for Problem 20
21. The session is:
x = [0:0.01:2];
u = 2*log10(60*x+1);
v = 3*cos(6*x);
plot(x,u,x,v, -- ),ylabel( Speed (miles/hour) ),...
xlabel( Distance x (miles) )
The plot is shown in the figure.
1-11
13. 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
−3
−2
−1
0
1
2
3
4
5
Distance x (miles)
Speed(miles/hour)
u
v
Figure : for Problem 21
1-12
14. 22. The session is:
x = [-3:0.01:3];
p1 = [3,-6,8,4,90];
p2 = [3,5,-8,70];
y = polyval(p1,x);
z = polyval(p2,x);
plot(x,y,x,z, -- ),ylabel( Current (milliamps) ),...
xlabel( Voltage x (volts) )
The plot is shown in the figure.
−3 −2 −1 0 1 2 3
0
100
200
300
400
500
600
Voltage x (volts)
Current(milliamps)
y
z
Figure : for Problem 22
1-13
15. 23. The session is:
p = [3,-5,-28,-5,200];
x = [-1:0.005:1];
y = polyval(p,x);
plot(x,y),ylabel( y ),xlabel( x ),ginput(1)
The peak as measured with the mouse cursor is y = 200.3812 at x = −0.0831
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
175
180
185
190
195
200
205
x
y
Figure : for Problem 23
24. The session is:
A = [7,14,-6;12,-5,9;-5,7,15];
b = [95;-50;145];
x = Ab
The answers are −3, 10, and 4, which correspond to x = −3, y = 10, and z = 4. Typing
A*x gives the result 95, -50, 145, which are the right-hand sides of the equations. Thus the
values of x, y, and z are correct.
25. The script file is:
1-14
16. x = -5;
if x < -1
y = exp(x + 1)
elseif x < 5
y = 2 + cos(pi*x)
else
y = 10*(x - 5) + 1
end
The answer for x = −5 is y = 0.0183. Change the first line to x = 3 to obtain y = 1. Then
change the first line to x = 15 to obtain y = 101.
26. The script file is:
sum = 0;
for k = 1:10
sum = sum + 5*k^3;
end
sum
The answer is sum = 15125.
27. The script file is:
sum = 0;k = 0;
while sum <= 2000
sum = sum + 2^k;
end
k
sum
The answers are k = 10 and sum = 2046.
28. The script file is:
amt1 = 1000;amt2 = 1000;
k1 = 0;k2 = 0;
while amt1 < 50000
k1 = k1 + 1;
amt1 = amt1*1.055 + 1000;
end
while amt2 < 50000
k2 = k2 + 1;
amt2 = amt2*1.045 + 1000;
1-15
17. end
diff = k2 - k1
The answer is diff = 2. Thus it takes 2 more years in the second bank.
29. The script file is:
a = 95;b = -50;c = 145;
A = [7, 14, -6;12, -5, 9;-5, 7, 15];
bvector = [a;b;c];
x = Abvector
The answers for x are −3, 10, 4, which correspond to x = −3, y = 10, and z = 4. Typing
A*x gives the result 95, -50, 145, which are the right-hand sides of the equations. Thus the
values of x, y, and z are correct.
30. The script file is:
k = 0;
for x = -2:.01:6
k = k + 1;
if x < -1
y(k) = exp(x+1);
elseif x < 5
y(k) = 2 + cos(pi*x);
else
y(k) = 10*(x-5) + 1;
end
end
x = [-2:.01:6];
plot(x,y),xlabel( Time x (seconds) ),ylabel( Height y (kilometers) )
The figure shows the plot.
1-16
18. −2 −1 0 1 2 3 4 5 6
0
2
4
6
8
10
12
Time x (seconds)
Heighty(kilometers)
Figure : for Problem 30
1-17
19. 31. The script file is:
x = 0;
y = 0;k = 0;
while y < 9.8
k = k + 1;
x = x + 0.01;
y(k) = 10*(1-exp(-x/4));
end
xmax = x
x = [0:.01:xmax];
plot(x,y),xlabel( Time x (seconds) ),ylabel( Force y (newtons) )
The figure shows the plot.
0 2 4 6 8 10 12 14 16
0
1
2
3
4
5
6
7
8
9
10
Time x (seconds)
Forcey(newtons)
Figure : for Problem 31
1-18
20. 32. The area is given by
A = WL +
1
2
W
2
2
which can be solved for L:
L =
A − W2/8
W
The perimeter is given by
P = 2L + W + 2
W
2
2
+
W
2
2
= 2L + W + 2
W
√
2
The script file is:
W = 6;A = 80;
L = (A - W^2/8)/W
P = 2*L + W + 2*W/sqrt(2)
The answers are L = 12.58 meters and the total length is the perimeter P = 39.65 meters.
33. Applying the law of cosines to the two traingles gives
a2
= b2
1 + c2
1 − 2b1c1 cos A1
a2
= b2
2 + c2
2 − 2b2c2 cos A2
With the given values we can solve the first equation for a, then solve the second equation
for c2. The second equation is a quadratic in c2, and can be written as
c2
2 − (2b2 cos A2)c2 + b2
2 − a2
= 0
The script file is:
b1 = 180;b2 = 165;c1 = 115;A1 = 120*pi/180;A2 = 100*pi/180;
a = sqrt(b1^2 + c1^2 - 2*b1*c1*cos(A1));
roots([1,-2*b2*cos(A2),b2^2-a^2])
The two roots are c2 = -228 and c2 = 171. Taking the positive root gives c2 = 171 meters.
34. The area is given by
A = 2RL +
1
2
πR2
which can be solved for L:
L =
A − πR2/2
2R
The cost is given by
C = 30(2R + 2L) + 40πR
The script file is given below. Several guesses for the range of x had to be made to find the
range where the cost showed a minimum value.
1-19
21. clear
A = 1600;k = 0;
for x = 5:0.01:30
k = k + 1;
R(k) = x;
L(k) = (A - 0.5*pi*x^2)/(2*x);
C(k) = 30*(2*x + 2*L(k)) + 40*pi*x;
end
plot(R,C,R,20*L),xlabel( Radius (ft) ),ylabel( Cost ($) ),...
[rmin,costmin] = ginput(1)
Lmin = (A - 0.5*pi*rmin^2)/(2*rmin)
r1 = 0.8*rmin;r2 = 1.2*rmin;
L1 = (A - 0.5*pi*r1^2)/(2*r1);
L2 = (A - 0.5*pi*r2^2)/(2*r2);
cost1 = 30*(2*r1 + 2*L1) + 40*pi*r1
cost2 = 30*(2*r2+2*L2) + 40*pi*r2
The figure shows the plot. Using the cursor to select the minimum point on the curve, we
obtain the optimum value of the radius R to be rmin = 18.59 feet, and the corresponding
cost is costmin = $5140. The corresponding length L is Lmin = 28.4 feet. The costs
corresponding to a ±20% change from r = 18.59 are cost1 = $5288 (a 3% increase) and
cost2 = $5243 (a 2% increase). So near the optimum radius, the cost is rather insensitive
to changes in the radius.
1-20
23. 35. Typing help plot gives the required information. Typing help label obtains the
response label not found. In this case we need to be more specific, such as by typing
help xlabel, because label is not a command or function, or we can type lookfor label.
Similarly, typing help cos gives the required information, but typing help cosine obtains
the response cosine not found. Typing lookfor cosine directs you to the cos command.
Typing help : and help * gives the required information.
36. (a) If we neglect drag, then conservation of mechanical energy states that the kinetic
energy at the time the ball is thrown must equal the potential energy when the ball reaches
the maximum height. Thus
1
2
mv2
= mgh
where v is the initial speed and h is the maximum height. We can solve this for v: v =
√
2gh.
Note that the mass m cancels, so the result is independent of m.
For h = 20 feet, we get v = 2(32.2)(20) = 35.9 feet/second. Because speed measured
in miles per hour is more familiar to most of us, we can convert the answer to miles per
hour as a “reality check” on the answer. The result is v = 35.9(3600)/5280 = 24.5 miles
per hour, which seems reasonable.
(b) The issues here are the manner in which the rod is thrown and the effect of drag on
the rod. If the drag is negligible and if we give the mass center a speed of 35.9 feet/second,
then the mass center of the rod will reach a height of 20 feet. However, if we give the rod
the same kinetic energy, but throw it upward by grasping one end of the rod, then it will
spin and not reach 20 feet. The kinetic energy of the rod is given by
KE =
1
2
mv2
mc +
1
2
Iω2
where vmc is the speed of the rod’s mass center. For the same rotational speed ω and kinetic
energy KE, a rod with a larger inertia I will reach a smaller height, because a larger fraction
of its energy is contained in the spinning motion. The inertia I increases with the length
and radius of the rod. In addition, a longer rod will have increased drag, and will thus reach
a height smaller than that predicted using conservation of mechanical energy.
37. (a) When A = 0◦, d = L1 + L2. When A = 180◦, d = L1 − L2. The stroke is the
difference between these two values. Thus the stroke is L1 + L2 − (L1 − L2) = 2L2 and
depends only on L2.
b) The Matlab session looks like the one shown in the text, except that L1 = 0.6 is
used for the first plot and L1 = 1.4 for the second plot . The plots are shown in the two
figures. Their general shape is similar, but they are translated vertically relative to one
another.
1-22
24. 0 20 40 60 80 100 120 140 160 180
0
0.2
0.4
0.6
0.8
1
1.2
A (degrees)
d(feet)
Figure : for Problem 37
1-23
25. 0 20 40 60 80 100 120 140 160 180
0.8
1
1.2
1.4
1.6
1.8
2
A (degrees)
d(feet)
Figure : for Problem 37
1-24