At the end of the exam you must copy that folder onto a USB stick. Also, you must your files to the instructor.

Similar documents
GRAVITATION. F = GmM R 2

PHYSICS 221 SPRING 2014

PHY 111L Activity 2 Introduction to Kinematics

PHYSICS 111 SPRING FINAL EXAM: May 2, 2017; 2:15pm - 4:15pm

Phy 100 s Lab - Measurement techniques for mass, size and density. Name Course & Sec. Lab Partner

PHYSICS 211 LAB #3: Frictional Forces

PHYSICS 221 SPRING EXAM 2: March 30, 2017; 8:15pm 10:15pm

Copyright 2008 Pearson Education, Inc., publishing as Pearson Addison-Wesley.

Linear Motion with Constant Acceleration

Physics 103 Newton s 2 nd Law On Atwood s Machine with Computer Based Data Collection

= v = 2πr. = mv2 r. = v2 r. F g. a c. F c. Text: Chapter 12 Chapter 13. Chapter 13. Think and Explain: Think and Solve:

June Mr. Brown

PHYSICS 221 Fall 2013 EXAM 2: November 6, :15pm 10:15pm. Name (printed): Recitation Instructor: Section #:

Kepler's Laws and Newton's Laws

PHYSICS 221 SPRING 2013

ALGEBRA 2 HONORS SUMMER WORK. June Dear Algebra 2 Students,

Physics 2080 Extra Credit Due March 15, 2011

Chapter 13: universal gravitation

Name. Satellite Motion Lab

ASTRO 1050 LAB #1: Scientific Notation, Scale Models, and Calculations

PHYSICS 221 Fall 2007 EXAM 2: November 14, :00pm 10:00pm

Patterns in the Solar System (Chapter 18)

CLEA/VIREO PHOTOMETRY OF THE PLEIADES

AP Physics B SUMMER ASSIGNMENT Summer, Instructor: Rhett Butler

PHYSICS 222 Fall 2009 EXAM 1: October 1, :00pm 10:00pm

Newton s Wagon. Materials. friends rocks wagon balloon fishing line tape stopwatch measuring tape. Lab Time Part 1

PHYSICS 221 Fall 2016 EXAM 2: November 02, :15pm 10:15pm. Name (printed): Recitation Instructor: Section #:

PHYSICS 221 SPRING EXAM 1: February 20, 2014; 8:15pm 10:15pm

PHYSICS 111 SPRING EXAM 2: March 7, 2017; 8:15-9:45 pm

I. Introduction. II. An Introduction to Starry Night NAME: ORBITAL MOTION

Visual Physics 218 Forces & Acceleration [Lab 3]

PHYSICS 111 SPRING EXAM 1: February 6, 2017; 8:15pm - 9:45pm

PHYS133 Lab 1 Math Review

Testing Newton s 2nd Law

FIFTH MIDTERM -- REVIEW PROBLEMS

ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION /8:00-9:30


1m 100cm=1m =1 100cm 1m 89cm = 0.89m 100cm

LECTURE 19: Universal Law of Gravitation

Gravity Lab Introduction. Name. Date Block

PHYSICS 221 SPRING 2015

PHY 221 Lab 7 Work and Energy

Sect Scientific Notation

LAB 2 - ONE DIMENSIONAL MOTION

Astronomy 102 Math Review

Ch. 3 Notes---Scientific Measurement

Prelab 4: Revolution of the Moons of Jupiter

ALGEBRA 2 SUMMER WORK. June Dear Algebra 2 Students,

EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3)

Representations of Motion in One Dimension: Speeding up and slowing down with constant acceleration

Possible Prelab Questions.

<This Sheet Intentionally Left Blank For Double-Sided Printing>

Newton's 2 nd Law. . Your end results should only be interms of m

LAB 6: WORK AND ENERGY

Exam 3 April 16, 2014

AY2 Winter 2017 Midterm Exam Prof. C. Rockosi February 14, Name and Student ID Section Day/Time

Patterns in the Solar System (Chapter 18)

Investigate the relationship between the extension of a spring and the applied force

PHY 111L Activity 9 Moments of Inertia

Page Points Score Total: 100

Key Points: Learn the relationship between gravitational attractive force, mass and distance. Understand that gravity can act as a centripetal force.

Base your answers to questions 5 and 6 on the information below.

6.5 Metric U.S. Customary Measurement Conversions

PHYSICS 111 SPRING EXAM 2: March 8, 2016; 8:15-9:45 pm

Where IS North? Experiment OBJECTIVES

July 19 - Work and Energy 1. Name Date Partners

LAB 6: WORK AND ENERGY

EXAM #2. ANSWERS ASTR , Spring 2008

Visual Physics Forces & Acceleration Lab 3

Lab 8 Impulse and Momentum

PHY 221 Lab 9 Work and Energy

Name Student Activity

PHYS208 RECITATIONS PROBLEMS: Week 2. Gauss s Law

GEOL212 Due 9/24/18 Homework 4

Lab 9 - Rotational Dynamics

2nd. The TI-30XIIS Calculator and Fractions, Mixed Numbers and Decimals These are the buttons we will be using to calculate fractions.

Lab 8 Impulse and Momentum

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations

Unit 5 Gravitation. Newton s Law of Universal Gravitation Kepler s Laws of Planetary Motion

LAB 3: WORK AND ENERGY

MEASUREMENT IN THE LABORATORY

PHYSICS 221 Fall 2016 FINAL EXAM: December 12, :30pm 6:30pm. Name (printed): Recitation Instructor: Section #:

OUTSIDE LAB 4: Finding the Distances and Sizes of Remote Objects

THE CONSERVATION OF ENERGY - PENDULUM -

Question 1. GRAVITATION UNIT H.W. ANS KEY

EXPERIMENT 6 CONSERVATION OF LINEAR MOMENTUM

PHYSICS 111 SPRING EXAM 2: March 6, 2018; 8:15-9:45 pm

Lecture 13. Gravity in the Solar System

M61 1 M61.1 PC COMPUTER ASSISTED DETERMINATION OF ANGULAR ACCELERATION USING TORQUE AND MOMENT OF INERTIA

Scientific Notation. exploration. 1. Complete the table of values for the powers of ten M8N1.j. 110 Holt Mathematics

Equations and inequalities

Physics 9 Summer 2010 Midterm

KNOWLEDGE TO GET FROM TODAY S CLASS MEETING

. Section: Your exam contains 4 problems. The entire exam is worth 60 points.

PHYSICS LAB Experiment 7 Fall 2004 CONSERVATION OF MOMENTUM & COLLISIONS

PHYSICS 221 SPRING EXAM 1: February 16, 2012; 8:00pm 10:00pm

Lab 8: Magnetic Fields

Apples and Planets. PTYS Feb 2008

SPRING 2005 Midterm Exam #1, Part A

KNOWLEDGE TO GET FROM TODAY S CLASS MEETING

Transcription:

Before you begin your work, please create a new file folder on your computer. The name of the folder should be YourLastName_YourFirstName For example, if your name is John Smith your folder should be named Smith_John. Please store all your C files in that folder. Name your C files simply 1.c, 2.c, 3.c, 4.c, and 5.c. At the end of the exam you must copy that folder onto a USB stick. Also, you must e-mail your files to the instructor. Please attach all of your *.c files to one e-mail. Use this subject line: CprE185: Midterm 1, Section X Where X is your lab section (ask your TA if you don t know it). Please DO NOT leave the room until you have done these 2 things: copied your folder onto the USB memory stick and e-mailed your *.c files!!! 1. Concentric Circles (10 points) Write a C program that calculates the area of the white surface shown in the figure below. The program must ask the user to enter the radius of the outer circle and also the radius of the inner circle. The output must be formatted with exactly three significant digits after the decimal point. Enter the outer radius: 2.5 Enter the inner radius: 1.5 The area of the white surface is: 12.566

2. Quarter-Mile Race (15 points) Write a complete C program that calculates the estimated time (ET) for two cars to finish a quarter-mile race. The estimated time can be calculated using the weight of the car in pounds and the cars horsepower with the formula: ET = (Weight/HP)^(1/3)*(233/40) Enter weight and HP of car 1: 2996 225 Enter weight and HP of car 2: 2745 190 Car 1 ET: 13.806 Car 2 ET: 14.187 Enter weight and HP of car 1: 2900 550 Enter weight and HP of car 2: 3100 650 Car 1 ET: 10.139 Car 2 ET: 9.805

3. Matrix Vector Multiplication (15 points) Write a program that multiplies a 2x2 matrix A with a 2x1 column vector x. The result is a 2x1 column vector b. The relevant formulas for calculating the two components of b are shown below. Ax = b <==> a1 a2 * x1 = b1 <==> b1 = a1*x1 + a2*x2 a3 a4 x2 b2 b2 = a3*x1 + a4*x2 In other words, write a C program that takes six values from the user, calculates two values (b1 and b2) according to the above formulas, and then prints the vector b on the screen. The result vector must be printed in a separate function. The vertical bars to the right of the result vector must be aligned. You can assume that the user will only enter integer values in the range -99 to +99 such that the calculated values for b1 and b2 can be printed with three characters or less. Please enter the four values of matrix A (a1 a2 a3 a4): 3 5 1-1 Please enter the two values of vector x (x1, x2): -3 1 Vector b, the product of A and x, is therefore: -4-4 Please enter the four values of matrix A (a1 a2 a3 a4): -12 3 3 1 Please enter the two values of vector x (x1, x2): 3-1 Vector b, the product of A and x, is therefore: -39 8

4. Determinant of a Matrix (15 points) Write a C program that: 1) takes in the elements of a 3x3 matrix from the user 2) calls a function to print the matrix 3) calls another function to compute the determinant of the matrix 4) prints the determinant inside the main function. You can assume that all elements of the matrix will be integers in the range 0-99. The determinant of a 3x3 matrix is given by the following formula: Enter row 1 of the matrix> 1 2 3 Enter row 2 of the matrix> 4 11 6 Enter row 3 of the matrix> 10 9 8 Matrix: 1 2 3 4 11 6 10 9 8 The determinant of the matrix is -132

5. Binary Orbits (15 points) According to Kepler's laws of planetary motion, as well as Newton's laws of universal gravitation, celestial bodies in space will orbit in elliptical paths along a common center of mass called the barycenter. For a system with only 2 stars (a binary star system), the stars will appear to move in circles around the barycenter. The orbital elements of each star can be calculated using the following equations: sqrt(m_b^2 * G) V_a = ----------------------- sqrt((m_a + m_b) * d) sqrt(m_a^2 * G) V_b = ----------------------- sqrt((m_a + m_b) * d) d * m_b R_a = ----------- m_a + m_b d * m_a R_b = ----------- m_a + m_b Where: * d is the distance between the 2 stars (in meters), * m_a and m_b are the masses of stars A and B (in kilograms) * V_a and V_b are the orbital velocities of stars A and B (in m/s) * R_a and R_b are the distances from each star to the barycenter (in m) * G is the Universal Gravitational Constant: 6.674e-11 (m^3 / kg*s^2) You must write a complete C program that reads in the masses of the 2 stars (in kilograms), as well as the distance between them (in meters). You must then calculate the orbital elements V_a, V_b, R_a, and R_b, and print these out to the screen. Since the numbers involved will be quite large, you first must convert the star velocities from m/s to km/s and the barycenter distances from m to km. Also, since stars are VERY massive objects, with masses well into the 10^30 kg range, you may want to use scientific notation form. It works the same as any other double value, but instead of entering the number in normal form, you enter it in scientific notation (ex. double num = 1e30; or #define myvalue 8.8e-2). To ensure the highest degree of accuracy, make sure to use doubles, NOT floats. Print all of your results to 2 decimal places, i.e. %.2f in printf. Enter the mass of star A in kg: 1.63e30 Enter the mass of star B in kg: 8.72e29 Enter the distance between the two stars in m: 1.55e10 Star A orbits the barycenter at a velocity of 36.17 km/s, and a distance of 5402078.34 km. Star B orbits the barycenter at a velocity of 67.62 km/s, and a distance of 10097921.66 km.