Course Hero - We put you ahead of the curve!
You have requested the below document.

hw4_solutions UCSD MAE 107
Sign up now to view this document for free!
  • Title: hw4_solutions
  • Type: Notes
  • School: UCSD
  • Course: MAE 107
  • Term: Spring

Coursehero >> California >> UCSD >> MAE 107
Course Hero has millions of student submitted documents similar to the one below including study guides, homework solutions, papers, and exam answer keys.

107 MAE Spring 2007 HW 4 Problem 1 Contents The terms can be collected to give: The terms can be collected to give: A = [0 -7 5;0 4 7;-4 3 -7] b = [50;-30;40] x = A\b AT = A' AI = inv(A) % transpose % inverse A = 0 0 -4 -7 4 3 5 7 -7 b = 50 -30 40 x = -15.1812 -7.2464 -0.1449 AT = 0 -7 5 0 4 7 -4 3 -7 AI = -0.1775 -0.1232 -0.2500 -0.1014 0.0580 0.0725 0.1014 0 0 Published with MATLAB 7.4 MAE 107 Spring 2007 HW 4 Problem 2 Contents Function to multiply two matrices Test mat_mult for matrices from Prob 8.4 Function to multiply two matrices type mat_mult.m % function to multiply two matrices function X=mat_mult(Y,Z) if nargin < 2 disp('at least 2 input arguments required'); return end [m,n]=size(Y); [n2,p]=size(Z); if n ~= n2 disp('Inner matrix dimensions must agree.'); return end for i = 1:m for j = 1:p s=0; for k=1:n s=s+Y(i,k)*Z(k,j); end X(i,j)=s; end end end Test mat_mult for matrices from Prob 8.4 A = [6 -1;12 8;-5 4] B = [4 0;0.5 2] C = [2 -2;-3 1] mat_mult(A,B) mat_mult(A,C) mat_mult(B,C) mat_mult(C,B) mat_mult(B,A) mat_mult(C,A) A = 6 12 -5 -1 8 4 B = 4.0000 0.5000 0 2.0000 C = 2 -3 -2 1 ans = 23.5000 52.0000 -18.0000 -2.0000 16.0000 8.0000 ans = 15 0 -22 -13 -16 14 ans = 8 -5 -8 1 ans = 7.0000 -11.5000 -4.0000 2.0000 Inner matrix dimensions must agree. Inner matrix dimensions must agree. Published with MATLAB 7.3 MAE 107 Spring 2007 HW 4 Problem 3 Contents Part (a) Part (b) Part (a) The determinant can be computed as follows: D = 0*det([2 -1; -2 0]) - (-3)*det([1 -1; 5 0]) + 7*det([1 2; 5 -2]) D = -69 Part (b) Cramer's rule x1 = det([2 -3 7; 3 2 -1; 2 -2 0]) / D x2 = det([0 2 7; 1 3 -1; 5 2 0]) / D x3 = det([0 -3 2; 1 2 3; 5 -2 2]) / D x1 = 0.9855 x2 = 1.4638 x3 = 0.9130 Published with MATLAB 7.3 HW 4 Problem 3 Part (c) Pivoting is necessary, switch so first and third rows 5x1 - 2x2 = 2 x1 + 2x2 + x3 = 3 -3x2 + 7x3 = 2 Multiply pivot row 1 by 1/5 and subtract the result from the second row to eliminate the a21 term. 5x1 - 2x2 = 2 2.4x2 - x3 = 2.6 -3x2 + 7x3 = 2 Pivoting is necessary so switch the second and third row, 5x1 - 2x2 = 2 -3x2 + 7x3 = 2 2.4x2 - x3 = 2.6 Multiply pivot row 2 by 2.4/(3) and subtract the result from the third row to eliminate the a32 term. 5x1 - 2x2 = 2 -3x2 + 7x3 = 2 4.6x3 = 4.2 By back substituion, x3 = and, x2 = 1.463768, x1 = 0.985507 4.2 = 0.913043 4.6 Part (d) Substituing back in original equations, we see that they are satisfied, -3(1.463768) + 7(0.913043) = 2 0.985507 + 2(1.463768) - 0.913043 = 3 5(0.985507) - 2(1.463768) = 2 1 HW 4 Problem 4 Discretization of problem Discretizing the continuous ODE using central finite difference, 0=D Collecting terms, -(D + 0.5U x)ci-1 + (2D + kx2 )ci - (D - 0.5U x)ci+1 = 0 Assuming x = 1, and substituting parameters, -2.5ci-1 + 4.2ci - 1.5ci+1 = 0 ci+1 - 2ci + ci-1 c-+1 - ci-1 -U - kci 2 x 2x Matlab output A=[4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2 -1.5 0 0 0 0 0 0 0 -2.5 4.2] b=[200 0 0 0 0 0 0 0 30]' c=A\b A = 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 -2.5000 0 0 0 0 0 0 0 -1.5000 4.2000 b = 200 1 0 0 0 0 0 0 0 30 c = 68.6755 58.9581 50.6236 43.4825 37.3783 32.1884 27.8305 24.2779 21.5940 Plotting plot(0:10, [80 c' 20]) 2 80 70 60 50 40 30 20 0 1 2 3 4 5 6 7 8 9 10 3

Find millions of documents here - Study Guides, Homework Solutions, Papers, Exam Answer Keys and more. Course Hero has millions of course related materials that will enable you to learn better, faster and get an A in all your courses.
Below is a small sample set of documents:

BoerFiveMythsMgmtAcctg1994
Path: Rhodes >> BUS >> 243 Spring, 2008

Description: ...
Grand Inquisitor
Path: Rhodes >> RELS >> 102 Spring, 2008
Description: ...
Cyril, Lectures on Xn Sacraments
Path: Rhodes >> RELS >> 102 Spring, 2008
Description: ...
Dionysius_the_Areopagite
Path: Rhodes >> RELS >> 102 Spring, 2008
Description: ...
Egeria's Travel Journal
Path: Rhodes >> RELS >> 102 Spring, 2008
Description: ...
14.3-partial-derivatives.edit
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
quiz 1-solutions
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
MATH_200_spring_07_exam_1
Path: Drexel >> MATH >> 200 Spring, 2008
Description: * This is exam 1 from Spring 2007. Be aware that material covered by our first exam may be different - we have covered some things that they did not, and they covered some things that we did not, at the same point in the quarter. Problems for materia...
MATH_200_spring_08_exam_2_with_solutions
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
MATH_200_spring_07_final__with_solutions
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
15.4-parametric_surfaces_surface_area.edit
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
14.1-level-curves-and-surfaces.edit
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
MATH_200_spring_08_exam_1_with_solutions
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
MATH_200_spring_07_exam_2_with_solutions
Path: Drexel >> MATH >> 200 Spring, 2008
Description: Exam Two MATH 200 Spring, 2007 WARNING! This exam is being provided as a study aid. However, be aware that the syllabus for Math 200 Spring 2008 is a little different from the syllabus from Spring 2007. So the exams for this year will cover somewh...
PHYS-102hw3soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: PHYS-102 Homework 3 Solutions Spring-08 _ Chapter 20 Electric Potential and Capacitance 1,11,27 P20.1 (a) Energy of the proton-field system is conserved as the proton moves from high to low potential, which can be defined for this problem as moving f...
MATH_200_spring_08_exam_3_with_solutions
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Exam Three MATH 200 Spring, 2008 Total Pg 1 (20 pts) Pg 2 (25 pts) Pg 3 (25 pts) Pg 4 (20 pts) Pg 5 (10 pts) Pg 6 (4 pts) Name_ Section_ Show all your work on the exam paper, legibly and in detail, to receive full credit. No Calculators. 1. Co...
Week7_2
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Consider the current in the length of wire shown in Figure 22.24. Rank the points A, B, and C, in terms of magnitude of the magnetic field due to the current in the length element shown, from greatest to least. 1. 2. 3. A>B>C B>C>A C>A>B 33% 33% ...
13.2-calculus-of-space-curves.edit
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
MATH_200_spring_07_exam_3_with_solutions
Path: Drexel >> MATH >> 200 Spring, 2008
Description: Exam Three MATH 200 Spring, 2007 Name_ Section_ Show all your work on the exam paper, legibly and in detail, to receive full credit. No Calculators. Page 1) _ 2) _ 3) _ 4) _ 5) _ 6) _ Total 1. (20 points) Use the appropriate form of the multi-d...
Week9_2
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: AC Generators Electric generators take in energy by work and transfer it out by electrical transmission The AC generator consists of a loop of wire rotated by some external means in a magnetic field 1 Induced emf In an AC Generator The induced emf ...
PHYS_102-Spring08-Q3-Soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: OUTLINE OF SOLUTIONS PHYS-102 SPRING-08 QUIZ-III Time Limit: 50 min. NOTE: For Prob.1, below, please circle the answer of your choice for each part. 1a. Two wires each of length, L are made of the same material of electrical resistivity and have u...
PHYS-102hw4soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: PHYS-102 Homework 4 Solutions Spring-08 _ Chapter 20 Electric Potential and Capacitance 41, 49, 69 1 1 1 = + Cs 15.0 3.00 Cs = 2.50 F Cp = 2.50 + 6.00 = 8.50 F ! $ 1 1 Ceq = # + \" 8.50 F 20.0 F & % (b) \'1 P20.41 (a) = 5.96 F Q = C!V = ( 5.96...
PHYS-102hw2soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: PHYS-102 Homework 2 Solutions Spring 06/07 _ Chapter 19 Electric Forces and Electric Fields P19.31 A = ! r 2 = ! ( 0.200 ) = 0.126 m 2 2 !E = EA cos \" 5.20 ! 105 = E ( 0.126 ) cos 0 E = 4.14 ! 106 N C = 4.14 MN C P19.36 # ! mg = qE = q %...
PHYS-102hw5soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: PHYS-102 Homework 5 Solutions Spring-08 _ Chapter 21 Current and Direct Current Circuits 25, 29, 31 P21.25 (a) P= (V )2 R 20.0 W = becomes so (b) (11.6 V )2 R R = 6.73 . FIG. P21.25 V = IR so and 11.6 V = I (6.73 ) I = 1.72 A e = IR + Ir s...
15.3-double_integrals_polar
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
Week8_1
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Ampere\'s Law Ampere\'s Law r r states that the line integral of B ds around any closed r path ds equals oI where I is the total steady current passing through any surface bounded by the closed path r r B ds r r B ds = o I Ampere\'s Law, cont Amp...
12.4-cross-products.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: > term1:=(u2*v3-u3*v2)^2+(u3*v1-u1*v3)^2+(u1*v2-u2*v1)^2; > term2:=(u1^2+u2^2+u3^2)*(v1^2+v2^2+v3^2)-(u1*v1+u2*v2+u3*v3)^2; > term1 - term2; > expand(%); ...
Week8_2
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Faraday\'s Law of Induction This is generally expressed as: an induced emf is produced in the secondary circuit by the changing magnetic field The actual existence of the magnetic field is not sufficient to produce the induced emf, the field must be c...
12.2-vectors-plus-dot.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
12.3-more-dots.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
15.5-Triple_Integrals.edit
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
12.1-rectangular-coordinates.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
PHYS-102hw1soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: PHYS-102 Homework 1 Solutions Spring 06/07 _ Chapter 19 Electric Forces and Electric Fields P19.7 (a) The force is one of attraction . The distance r in Coulomb\'s law is the distance between centers. The magnitude of the force is F= . (b) ke q1 ...
PHYS102_Quiz2_Soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: PHYS-102 SPRING-08 QUIZ-II Time Limit: 50 min. Recitation Sec.#_ _ Name_ Notes:1. For problems 2 and 3, your solutions must have adequate details to get full credit. kQ1Q2 r2 U = kQ1Q2/r ; V = kQ/r ; F = qE F= 1/40 = k = 9 x109 Nm 2C !2 1/C ...
15.2-double_integrals_nonrectangular.edit
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
Quiz1 Soln
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: PHYS-102 QUIZ-I SOLUTION SPRING-08 Time allowed: 50 min. Notes: 1. For Prob.1 please circle the answer of your choice for each part. 2. For problems 2 and 3, your solutions must have adequate details to get full credit. __ Name (Please PRINT) _ _ r ...
13.1-Vector-Valued Functions.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
12.7-quadric-surfaces.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
12.5-lines.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
12.6-planes.edit
Path: Drexel >> CALC >> 200 Spring, 2008
Description: ...
hw12.7
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw14.4
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw14.5
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw14.6
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw14.7
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw14.8
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw15.1
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw15.2
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw15.3
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw15.4
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw15.5
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw12.8
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw13.1
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw13.2
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw14.1
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw14.3
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw12.1
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw12.2
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw12.3
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw12.4
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw12.5
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
hw12.6
Path: Drexel >> MATH >> 200 Spring, 2008
Description: ...
Week7_1
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Problem 22.54. Assume that the region to the right of a certain vertical plane contains a vertical magnetic field of magnitude 1.00 mT and that the field is zero in the region to the left of the plane. An electron, originally traveling perpendicular ...
Week5_2
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: emf A source of emf (electromotive force) is an entity that maintains the constant voltage of a circuit The emf source supplies energy, it does not apply a force, to the circuit The battery will normally be the source of energy in the circuit Co...
Week6_1
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: RC Circuits A direct current circuit may contain capacitors and resistors, the current will vary with time When the circuit is completed, the capacitor starts to charge The capacitor continues to charge until it reaches its maximum charge (Q = C) Onc...
Week6_2
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Electric and Magnetic Fields An electric field surrounds any stationary electric charge The region of space surrounding a moving charge includes a magnetic field In addition to the electric field A magnetic field also surrounds any material with per...
Week3_2
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Quiz reminder Quiz next Wednesday 8:00am 8:50 am Refer to course website for exam location No make-up quiz! 1 conceptual and 2 numerical problems Coverage: Chapter 19 Preparation: concentrate on L, R and HW problems as well as textbook examples; re...
Week4_1
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Quiz reminder Quiz next Wednesday 8:00am 8:50 am Refer to course website for exam location No make-up quiz! 1 conceptual and 2 numerical problems Coverage: Chapter 19 Bring your calculator Basic formulas will be provided as well as universal physic...
Week5_1
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Problem 20.54. (a) How much charge can be placed on a capacitor with air between the plates before it breaks down if the area of each of the plates is 5.00 cm2? (b) Find the maximum charge assuming polystyrene is used between the plates instead of ai...
Week3_1
Path: Drexel >> PHYS >> 102 Spring, 2008
Description: Lecture Notes for Chapter 19 http:/www.physics.drexel.edu/~jelena/Phys102Lectures /Lectures102Post.html 1 Applying Gauss\' Law Gauss\' Law is valid for the electric field of any system of charges or continuous distribution of charge. Although Gauss\' ...

Course Hero is not sponsored or endorsed by any college or university.