17
EO109 General Physics(I) (Chinese):普通物理(一) Semester 103-1 Teacher Version With Solutions 白小明 Jonathon David White 元智大学光电系 R70740, R70723 [email protected] 修改:中華民國 103 10 1 11 54 30 Modified AD14 10 1 “To Him Who Is Above And Beyond All” Name Teacher Student ID Teacher Class ID Teacher Cell Phone ??? Email [email protected] J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf) (Teacher) Semester 103-1 pg.i

General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

EO109General Physics(I) (Chinese):普通物理(一)

Semester 103-1

Teacher Version With Solutions

白小明Jonathon David White

元智大学光电系R70740, R70723

[email protected]

修改:中華民國 103 年 10 月 1 日 11 時 54 分 30 秒Modified AD14 年 10 月 1 日

“To Him Who Is Above And Beyond All”

Name Teacher

Student ID Teacher

Class ID Teacher

Cell Phone ???

Email [email protected]

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf) (Teacher) Semester 103-1 pg.i

Page 2: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

Table of Contents0. Introduction......................................................................................................................................3

0.1 Facilitators................................................................................................................................................................30.2 Respect.....................................................................................................................................................................30.3 Textbooks/References/Websites...............................................................................................................................40.4 Course Overview......................................................................................................................................................40.5 Calendar/Course Schedule.......................................................................................................................................50.6 Grading....................................................................................................................................................................6

1. Organizing a Solution – Algorithms, UML Activity Diagrams........................................................81.1 Algorithms................................................................................................................................................................81.2 UML Activity Diagrams...........................................................................................................................................91.3 Example: UML for Baking Muffins.......................................................................................................................121.4 Functions ...............................................................................................................................................................12

2. Formalizing the problem solving approach....................................................................................132.1 Problem Background and Statement .....................................................................................................................132.2 Think......................................................................................................................................................................132.3 Summarize and write as mathematical variables the information we have received:............................................132.4 Compile (search for in the literature) the necessary equations. ...........................................................................132.5 Do a simple hand calculation ................................................................................................................................132.6 UML diagram.........................................................................................................................................................14

3. Assignment Questions by Chapter..................................................................................................154. Notes by Chapter............................................................................................................................16

4.1 Chapter 1................................................................................................................................................................164.2 Chapter 2: Kinematics............................................................................................................................................16

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf) (Teacher) Semester 103-1 pg.ii

Page 3: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

0. Introduction

0.1 Facilitatorsa. Lecturer: 白小明 小明白

1. Background: http://www.xiaotu.com/whitejd/per/index.htm Jonathon David White was born in Oakville, Canada but has since lived in many other

countries. Even during his undergraduate days at McMaster University, he already had a cosmopolitan outlook on life, being active in the Chinese Christian Fellowship. After obtaining his Ph.D., also from McMaster University, he worked and taught in China, Japan, and Taiwan – where he met and married Wu Xiuman – and then Malaysia at Multimedia University. After 4 years (1999-2003) in the Faculty of Engineering and Technology at the Melaka campus of Multimedia University, he moved with his family to Taiwan. He is now Associate Professor at Yuan Ze University. He and his wife have two daughters, Ai-en (Charity Grace) and Liang-En (Ruth Ann) as well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught on a "need-to-know" basis. His introduction to ANSI-C came in 1994, when he took a position in the Ocean Remote Sensing Institute in Qingdao, China. Upon arrival, he was given a book introducing ANSI-C (in Chinese) and told to interface a computer, laser and detector – allowing him to simultaneously learn ANSI-C and Chinese! This "need-to-know" has resulted in the the method of teaching of this course.

2. Family: 爱有力量 https://www.youtube.com/watch?v=G1h9AhUh7o8 3. Research: http://www.xiaotu.com4. Email: [email protected]. Calendar: http://www.xiaotu.com6. Office: R70740, R70723 & Lab7. Office Hours: Wed 1600-1800, Thursday 1000-1200

b. Teaching Assistants1. Kevin: Vietnamese Ph.D. student R707402. Aray: Taiwanese Ph.D. student R707403. Amanuel: Ethiopian Graduate Student R70740

0.2 Respecta. Classroom Expectations

1. Arrive on Time (after attendance deemed absent)2. Listen to Lectures 3. Ask Questions (bonus marks)4. Listen to fellow students5. Food and Drinks are OK in the classroom6. Do not leave garbage in classroom7. During class: (as this distracts other students)

i. No FACEBOOK, ii. No computer games iii. No checking emailiv. No videosStudents disobeying rules will be asked to leave the classroom. If cited more than three (3)

times, student will be asked to drop the course.

b. Rules for the Computer Room 電腦教室使用規定1. 上課注意事項:

i. 準時到教室,遲到禁止進入教室。ii. 在教室裡請勿飲食,食物和飲料禁止帶進室內。

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 3

Page 4: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

iii. 每位同學上課都有固定位置,點名前請勿隨意更換位子。iv. 請勿隨意更動教室內電腦設定。

2. 下課注意要點:i. 請將垃圾帶走,丟在安全門外的垃圾桶。ii. 請將座椅歸回原本的位置。iii. 每個禮拜會安排值日生在課後檢查教室,請務必配合。iv. 有違反規定的將登記扣分v. 以上如有不清楚的部份,請找老師或助教協助

0.3 Textbooks/References/Websitesa. Textbook

Physics for Scientists and Engineers: A Strategic Approach with Modern Physics (3rd Edition) Hardcover – January 7, 2012 ISBN-13: 978-0321740908

The textbook will be used for the two courses in physics offered by our department. Key concepts are covered in the animations and view graphs

b. Websites1. http://www.xiaotu.com/tea/yzueo101.htm (Grade information and some links)2. http://exciton.eo.yzu.edu.tw/~courses/eophys/ Animations3. http://www.animations.physics.unsw.edu.au/ Animations4. http://www.masteringphysics.com Textbook Website / Homework

0.4 Course OverviewThis course is the first in a series of two courses for Optics students dealing with basic

physics. computer programming. The goals for this first course is to learn the calculus-based general physics as the foundation for any other courses in Dept of Photonics Engineering. 本課程協助光電工程學系學生建立其他學科之物理基礎, 做為高中學科與大二、大三、大四的專門學科(如電磁學、半導體物理、光學、近代物理)的橋樑。授與學生以微積分為基礎的普通物理課程, 著重基本原理以及例題的演算。

The teaching format is 0) Review of selected problems from previous chapters, 1) Introduction: Animations from Physclips (or other animations) to give overview 2) Following the textbook, the lectures focus on principles as well as example applications, and 3) Students learn the physics in depth by doing extensive homework on-line! 以課本為主軸,在課堂上講解原理,輔以例題。學生自己在作習題時從中領會物理的精要。

The key topic we will study are listed below in Table 1.Table 1: Key Topics in this course

# Topic 题目 Details

1 Measurement 量測 standard units of measurement, precision, order of magnitude estimates

介紹度量衡單位標準之制定、有效位數、數量級估計)

2 Kinematics 運動學 Vector, displacement, velocity, acceleration, differential, projectile motion, circular motion, relative motion

向量、位移、速度、加速度、微分、拋體運動圓周運動、相對運動

3 Newtonian dynamics

牛頓力學 Newton's three laws of mechanics, trying to show, surface gravity, elasticity, tension, normal force, mass and weight, friction, pulleys and ropes,

牛頓力學三大定律、示力圖、地表重力、彈力、張力、正向力、質量與重量、摩擦力、滑

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 4

Page 5: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

# Topic 题目 Details

centripetal force, false force 輪與繩、向心力、假力

4 Linear momentum

線性動量 impulse, linear momentum, conservation of linear momentum, collisions (elastic, inelastic, perfectly inelastic), a two-dimensional collision

衝量、線性動量、線性動量守恆、碰撞 (彈性、非彈性、完全非彈性)、二維碰撞

5 Energy 能量 Kinetic energy, power, integration, vector product, power, power - energy principle, surface gravitational potential energy, elastic potential energy, conservative forces, conservation of mechanical energy, potential energy - position and force curve

動能、功、積分、向量內積、功率、功–能原理、地表重力位能、彈力位能、保守力、力學能守恆、位能–位置曲線與力之關係

6 Rotation 轉動 Rigid, centroid, rotation motion, rotational kinetic energy, physical integration, moment of inertia, torque, static equilibrium, scroll, vector outer product, angular momentum, conservation of angular momentum

剛體、質心、轉動運動學、轉動動能、體積分轉動慣量、力矩、靜力平衡、滾動、向量外積角動量、角動量守恆

7 Oscillation 振盪 Harmonic oscillations, transverse spring oscillator, the relationship oscillation with a circular motion, the simple harmonic oscillation of energy conversion, simple harmonic oscillation of the equation of motion (simple differential equations description), vertical spring oscillator, pendulum, physical pendulum, damped oscillations, driven oscillation resonance

簡諧振盪、橫向彈簧振子、振盪與圓周運動之關係、簡諧振盪之能量轉換、簡諧振盪之運動方程式 (簡易微分方程式介紹)、垂直彈簧振子、單擺、物理擺、阻尼振盪、驅動振盪、共振

8 Waves 波 Longitudinal and shear waves, the basic parameters (wavelength, frequency, velocity, amplitude, phase), the energy and power delivery, the wave equation, the superposition principle, interference, the amount of phase transfer intensity standing wave resonance, sonic, pressure waves, sound and volume, tone, beat, Doppler effect

縱波與橫波、基本參數 (波長、頻率、波速振幅、相位)、傳遞的能量與功率、波方程式、疊加原理、干涉、相量、駐波、共振、聲波、壓力波的傳遞、聲音的強度與音量、樂音、拍頻、都卜勒效應

9 Thermodynamics 熱力學

A Traveling Waves 傳遞波

0.5 Calendar/Course ScheduleThe times on this calendar are tentative and may be changed depending on students' progress.

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 5

Page 6: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

Table 4: Course Plan and Time Table

Wk Topic Chapters Test Date

1 introduction; ch1 concept of motion; ch2 kinematics in 1D 1,2

2 ch2; ch3 review of vectors; ch4 kinematics in 2D 3,4

3 ch4; ch5 force and motion; ch6 dynamics I—motion in 1D 5,6

4 ch6; ch7 Newton's third law; ch8 dynamics II: motion in 2D 7,8

5 ch8; Review chapter 1 - 8 Challenge #1 (Newton's Laws)

Thursday, October 16, 2014

6 ch9 impulse and momentum; ch10 energy; 9,10

7 ch11 work; Review Chapter 9,10,11 11

8 Challenge #2 (Conservation Laws 9-11) ch 12: Rotation of a Rigid Body

12 Wednesday, November 5, 2014

9 midterm break - no class.

10 ch14 Oscillations ch15 fluids and Elasticity (Optional) 14,15

11 Review Chapter 12,14,15 Challenge #3 (Oscillations,Rotations,Fluids and Elasticity)

Thursday, November 27, 2014

12 ch20 Waves (Travelling Waves) 20

13 ch21 Waves (Superposition) 21

14 ch22 Waves (Optical) 22

15 ch23 Ray Optics 23

16 Review Chapter 20,21,22,23 HOLIDAY

17 Challenge #4 (Waves)ch 38 Quantization (Optional) ch 39 Wave Functions and Uncertainty (optional)

38,39 Wednesday, January 7, 2015

18 final exam week -- no class

0.6 GradingTable 2: Milestones and Their Weight for Midterm and Final Assessments

項目編號

項目名稱 Milestone 期中評量權重

Midyear學期總成績權重

Final

1 Newton's Laws X X

2 Conservation Laws X X

3 Oscillations,Rotations,Fluids and Elasticity X

4 Waves X

In addition there will be an additional 15% assigned for homework and 10% for in-class performance. Your mark will be calculated using the following equation:

Final=0.30×M top+0.20×M 2nd+0.15×M 3rd+0.10×M low+0.15×HS+0.10×CL

Consider, for example, the student Xiaoming with the grade in the table 3. On the one hand, since Milestone 1 was Xiaoming's best test, it is given a heavy weight in calculating his final results.

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 6

Page 7: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

On the other hand, he did poorly on Milestone 2, so it is given a very light weight in calculating this student's final results. Finally the points awarded for each milestone are added up with the result ath Xiaoming receives a B grade on the course.

Table 3: Sample Final Grade calculations for Xiaoming

項目編號 項目名稱 Milestone Grade (G) Weight (W) Points = G*W

1 Newton's Laws 90% 30% 0.27

2 Conservation Laws 20% 10% 0.02

3 Oscillations,Rotations,Fluids and Elasticity 70% 20% 0.14

4 Waves 50% 15% 0.08

- Homework Score (HW) 80% 15% 0.12

- In-class Performance Score (CL) 75% 10% 0.08

FINAL 70%

Similarly for the midterm grade the calculation proceeds similarily but since only two milestones have been tested, the calculation weighting is defined by:

Midterm=0.50×M top+0.25×M low+0.15×HS+0.10×CL

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 7

Page 8: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

1. Organizing a Solution – Algorithms, UML Activity Diagrams

1.1 Algorithmsa. Definition

An algorithm describes the steps that one needs to take to take in order to perform a certain task or computation. On the one hand, the same algorithm may be expressed in many different languages and still be the same algorithm even though it may look quite different. On the other hand, different algorithms can be used to perform the same task.

More formally, an algorithm is defined as:

b. Example: An algorithm to make muffinsA recipe is an example of an algorithm that describes how to prepare a specific dish or meal.

Consider for example the following algorithm that describes how one makes muffins*.

1. Prepare ingredients: 2 cups flour, 1 tsp baking powder. 5 tbsp milk powder, 1 egg, tbsp olive oil, 1 cup water

2. Turn oven on to 250 C.3. Mix wet ingredients (water,olive oil, egg)4. Mix dry ingredients (milk powder,flour,baking powder)5. Pour wet ingredients into dry ingredients.6. (Option: Add 1 cup of fruit(i.e. blueberries) into batter.)7. Mix leaving a few lumps in the batter8. Pour batter into muffin tray.9. Bake in oven for 20 minutes10. If brown (finished cooking), GOTO Step 1211. Bake for 1 more minute. GOTO Step 1012. Take out of Oven

This recipe explains the steps one follows to make muffins. It provides all the information that one needs to know to be successful. The new cook does not need to rediscover anything. Ignoring steps 6, 10, and 11 (in italics), the flow is seen to be linear – no decisions to make. Step 6 is a conditional or option – a decision needs to be made about whether to add berries to the muffin. Steps 10 and 11 indicate repetition: they need to be preformed a number of times until a condition is met. As a final note, notice that the order in which steps 3 and 4 are completed is not important – in fact, they could be done in parallel. In the following section we will introduce UML activity diagrams that allow us to illustrate diagrammatically this algorithm.

* http://eatathomecooks.com/2010/05/snickerdoodle-muffins.html (Downloaded picture on 2014.04.16)

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 8

A finite sequence of steps,- each step consisting of a number of operations,- each operation

1. is rigorously defined and unambiguous2. can be executed by a machine

Fig. {muffin} Snickerdoodle Muffin*

Page 9: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

1.2 UML Activity Diagramsa. Overview

Expressing your algorithm clearly before starting to write computer code is crucial for creating easy to understand, well structured code. In order to help you to do this, a standard, called Universal Modelling Language, UML for short, has been developed to help you learn to think before you start to code. (In the past we have used UML state diagrams to represent FSAs, now we will use UML activity diagrams to represent algorithms. If you have done programming before, you may have made use of a flowchart to represent an algorithm. The UML Activity diagram replaces a traditional flowchart.

Figure {UML} summarizes the key symbols that are used in UML activity diagrams. These diagrams are used to help us to show the steps in an algorithm. Fig. {UML} (a) identifies the symbols while Fig. {UML} (b) uses these symbols to describe the process are placed together to describe an algorithm to take the absolute value of a arbitrary number.

UML activity diagrams generally make use of five different symbols to represent Start, End, Activity (i.e. verb), Comment, Branch or Merge and three different types of lines to represent Transitions (solid lines with arrows), connect comments, and finally indicate Parallel processes. Within a given UML diagram, there should only be one start symbol. Activities are conducted in the order they appear in the diagrams. In the case that order is not important for two activities, then one can use the Parallel bar to indicate this. Fig. {UML} (b) shows how one can diagram an algorithm that returns the absolute value of a number. The the algorithm starts with a number (x) (indicated in comment box as a start condition.). Next a decision is made: if x>0 then we take the right path. If x<0 we take the left

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 9

Fig. {UML} (a) Key symbols used to describe algorithms using UML activity diagrams. (b) Putting together the symbols to describe and algorithm to take

the absolute value of a number.

Fig {UML-flow} UML diagrams illustrating the four basic types of flow (a) linear-sequential (b) conditional, (c) repetition (d) parallel processing.

Page 10: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

path. In the case that we take the right path, we just store the value of x in the variable y. In the case that we take the left path, we negate x and store the result in y. The paths then join back together (merge symbol) again and the algorithm ends. Note that if we take the right path, then we do not take the right path.

Figure {UML-flow} illustrates the four types of flow that can be implemented in a program. All algorithms can be expressed in terms of a combination of these flow structures. In Fig.{UML-flow}(a) linear-sequential flow is illustrated. In this type of flow, the activity in the upper box is first completed and then activity in the next box can be started. In (b) conditional flow is illustrated. Based on the the value of a variable or some condition either the right path is taken or the left path is taken. Both paths are never taken. Note that the diamond at beginning of the condition represents splitting of program flow while the diamond at the end represents a merging of the flow streams. In Figure {UML-flow} (c) illustrates repetition. In this type of flow, a given activity is repeated until some condition is met. Note that there is only one diamond representing the test condition and that the transition line pointing back ends on a transition line (not an activity box) Finally in (d) a specialized type of flow is illustrated: “parallel” processing. In this case, both activities are completed but the order in which they are completed is not important. Thus they can be done in parallel. In contrast to sequential processing, there is no order for activities. In contrast to conditional processing, both branches are taken. Parallel processing is denoted by a thick lines that mark both the beginning and end of the parallel activities.

b. Conditional FlowIn structured programming, conditional flow is generally structured in one of the three ways

shown in Fig. {UML-cond}. In each case comment boxes can be used to repesent the condition to be tested. If the condition is very simple, then it can just be written on a line leaving the split symbol.

In (a) we illustrate the structure if an action needs to be preformed no matter what the outcome of the check. (b) represents the condition that we only need to preform an action if something is true or false. For example, in our function to calculate absolute value of x, if we didn't want to create a new variable y but rather keep only one variable x, then we need do nothing in the positive case. Finally (c) represents a situation when we do different things in many different cases. For example, a function that based on the maximum education received by an individual preforms a different actions. In this case, on might process data based on whether the individual has graduated from university, high school, primary school or has received no formal education.

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 10

Fig. {UML-cond} Varieties of Conditional Flow (a) activities to do for both true and false conditions, (b) activity to do only for one condition (c) multiple cases.

Page 11: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

c. Repetition

In structured programming, repetition is generally structured in one of the two ways shown in Fig. {UML-rep}. Figure {UML-rep}(a) represents the case in which the condition is tested before the loop any activity is completed while (b) represents the case that the condition is tested after the activities have been completed one time. The key difference is that, in the first case, it is possible for the activities within the loop never to be executed Finally (c) represents the condition that the looping condition is tested in the middle of the loop. In structured programming this type of structure is forbidden as it makes code difficult to read. Note that the condition, if complicated, is written in a comment box and one transition is labelled as [true] or [false]. Alternatively, if the condition is simple we can write it on one of the transitions lines.

d. Common technical drawing mistakes

Other than logic, there are a number of common technical mistakes that are often made in drawing these types of diagrams. These are illustrated in Fig.UMLmistake,namely, arrows not connected to anything (a), skipping the merge icon on conditionals (b), feeding back into an activity box (c), multiple inputs into a merge box (OK in special

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 11

Fig. {UML-rep} Repetition Structures (a) Test before activities (b) test after activities (c) test in the middle of activities (This is generally forbidden in structured programming. )

Fig {UMLmistake} Common mistakes in UML Activity diagrams

Page 12: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

cases) (d) , multiple exits from a split symbol (OK in special cases) (e), non-rounded rectangles (f), and circles (g). Non-rounded rectangles are used in structural UML diagrams (not activity UML diagrams) to represent classes and circles are used in Finite State Diagrams. Finally in (h) we demonstrate the mistake of putting a number of different steps all in one box or using complicated English to describe a process (not machine executable). Each step should have its own box in an activity UML diagram.

1.3 Example: UML for Baking MuffinsAs a final example of UML, we will convert our baking

recipe to UML Activity diagrams, For simplicity in the example, just the step number is written in the activity boxes or comment box. The diagram makes it quite obvious that, at least at one point in time, at least three tasks can be done simultaneously. For example, I can have my youngest daughter, Liang-En doing step 3, Li-En doing step 4 and I can send my oldest daughter Aien warming up the oven.

1.4 Functions

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 12

Fig. UMLcake UML Activity diagram for baking muffins

Page 13: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

2. Formalizing the problem solving approach

2.1 Problem Background and Statement A number of old bombs have been unearthed in

Gipuzko(cf Fig. {bomb}). These bombs have the shape of a hollow sphere. Your coworkers have compiled a list of the bombs found along with their weight, and inner and outer diameters. Write a program to calculate the density of the material used to make the bombs. (From the density, one can then try to guess the material used to make the bombs.)

2.2 ThinkThe first step is think about how to solve the problem,

compile the equations needed (do a literature search if necessary) and attempt to solve the problem for a simple case.

2.3 Summarize and write as mathematical variables the information we have received:

douter : outside diameter of the spherical bombdinner : inside diameter of the hollow shellm : mass of the bomb

2.4 Compile (search for in the literature) the necessary equations. Density (p) is related to mass (m) and volume (V) of the material by p(m,V) = m/V (1)

From basic geometry, the volume of a solid sphere can be related to its diameter (d) by the expression as:

Vsphere (d)= pd3/6 (2)The volume material of the hollow shell can be expressed as the difference in volumes of an outer and inner sphere:

VhollowShell (Vouter ,Vinner) = Vouter - Vinner = V(douter) – V(dinner) (3)

2.5 Do a simple hand calculation Having assembled the required equations, we can then make a sample calculation with some

simple numbers. For example,douter = 20 cmdinner = 10 cmm = 30 kg

First we calculate the volumes of the outer sphere and the inner hollow region:

Vouter (douter)= pdouter3/6 = = p 203/6 = 4000p/3

Vinner(dinner)= pdinner3/6 = = p 103/6 = 1000p/6

From this we can estimate the total volume of material in the bomb:

VhollowShell(Vouter ,Vinner) = Vouter - Vinner = 4p/3 – p/6 = 7000p/6 ~ 3660 cm3

and finally the density of the material used to make the bomb casingp(m,V) = m/V = 30000 g / 3660 cm3 ~ 8 g/cm3 We can then compare this density with normal density of materials. From Wikipedia we can

look up the densities of a number of materials: (Aluminum, 2.643. Brass, 8.553. Cobalt, 8.8.

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 13

Fig. {bomb} A bomb from Gipuzko http://bertan.gipuzkoakultura.net/img

/18/grandes/130.jpg

Page 14: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

Copper, 8.9. Gold, 19.32. Ice, 0.897. Iron, 7.86. Lead, 11.37 g/cm3) Our result is closest to that for Iron and so we conclude that probably this bomb shell is made predominately from Iron with maybe the addition of some Lead.

2.6 UML diagramOnce we have worked through a sample problem, the next step is to summarize our algorithm

using a UML diagram.

In the above diagram, we can see that the first step is to get the required information from the user. Next we calculate both the inner and outer volumes for the spherical shell. Since order is not important, we draw these steps in parallel (note that these both use the same function with different inputs). This is followed by the calculation of the total volume of material in the bomb, followed by the density of the bomb. Note that these steps must follow in order, i.e., we cannot calculate the density of the bomb until we have calculated the total volume of material in the bomb. We cannot calculate the total volume of material until we have first calculated the inner and outer volumes.

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 14

Fig. {bomb-UML} UML Activity Diagram for Bomb Program

input: din,dout,m

output:p V,

Vout = dout Xpi/6

3

Vin = din Xpi/63

V = Vout Vin-

p = m V/

Page 15: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

3. Assignment Questions by ChapterAll questions are due completed on Tuesday of the week following their introduction in the

class. The following is an estimated timeline...Wk Chapters Start Date Due Date

1 0,1,2 2014-09-17 2014-09-23

2 3,4 2014-09-24 2014-09-30

3 5,6 2014-10-01 2014-10-07

4 7,8 2014-10-08 2014-10-14

5 TEST

6 9,10

7 11

8 12

9 TEST

10 14,15

11 TEST

12 20

13 21

14 22

15 23

16 TEST

17 38,39

18

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 15

Page 16: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

4. Notes by Chapter

4.1 Chapter 1

4.2 Chapter 2: Kinematicsa. Question: Santa Claus on my roof

Santa Claus has landed on the top of my roof in Canada. Due to the large amount of ice on the roof, he starts to slide down the roof. (1) Determine the velocity at which Santa Claus hits the ground using kinematic equations. (2) Determine the horizontal distance which Santa Clause travels before he hits the ground. Will he bump into the neighbour's house?

b. Picture and motion diagram (Fig. 1(left))

c. Graph of Motion (Fig. 1 (right))d. Data from maps.google.com : 129 Wentworth St. North, Hamilton ON.

h= 6 m, w=5 m, r=2.5 → b=p/4 rad, a=0.5 m (distance between houses).

e. Key observationsi. Acceleration is constant with two values. ii. We don't care about time.iii. starting velocity and distance is zeroiv. Use two coordinate systems (first one parallel to roof, next vertical)

f. Solution in symbols and with math:1. We don't care about time, so we first look at the roof

using a slanted 45 degree coordinate system with the x axis in the direction of motion

v1x2=v0x

2+2a Δ x

→ v1x=√2 g sin (β) ∼ 3.7ms

,

→ v1=3.7 i+0 j

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 16

Fig. Photo of 129 Wentworth St. North

Fig 1. (left) Picture and Motion Diagram (right) graph of motion vs time

Page 17: General Physics(I) (Chinese):普通物理(一) · well as two sons, You-en (Johann Donald) and Li-En (Leon Joshua). Dr. White's experience in programming has largely been self-taught

2. Next we can change to a vertical coordinate system (Rotation of 45 degrees)v1=3.7m /s ,θ=−π /4

v1=2.7 i − 2.7 j [m /s ]3. Now in the free fall, the horizontal speed will be unchanged but gravity will affect the vertical

component.

v2y2=v1y

2+2a Δ y = (2.7 m /s )

2+2×10 m/ s2

×6 m → v2y =−11.3m/ s4. Thus we can write the final velocity as...

v2 = 2.7 i−11.3 j [m /s ] ≡ (11.6 m/ s ,θ=0.23 rad (13.4o))

g. Assess. We would like to check the reasonableness of the data. If we can find the solution another way then can verify. Lets use energy method (later chapter)

mgh=mv2/2 →∣v∣=√2gh=√2×10×8.5=√170 ∼ 13 [m/ s] (similar, so OK)

h. Now we might like to know the horizontal distance travelled by Santa Claus and the time he has to consider his fate as he falls.

1. On the roof: v1x=a Δ t →Δ t=v1x /(g sin (β))=4√2/10=0.56 s2. In the free fall: v2y=v1y+a Δ t →Δ t=(v2y−v1y)/ g=(11−2.8)/10 s=0.8 s3. Therefore the horizontal distance travelled by Santa Claus is

d 2x=d 1x+v1x Δ t=2.5+2.8×0.8∼5m (uniform horizontal motion)

Looking at the Google Maps of the house, it is clear that Santa Claus will bump into the neighbouring house before he hits the ground! In fact, if he is falling near the back of the house, he will probably land on the neighbours roof!

4.3 Chapter 3

4.4 Chapter 4

4.5 Chapter 5: ForcesAt this point we have now starting physics!

J D White, General Physics(I) (Chinese):普通物理(一)(www.xiaotu.com/tea/yzueo101/eo101notes.pdf (Teacher) Semester 103-1 pg. 17

Mechanics

Kinematics (How?)

Observe...Ch 1 - 4

= d /dtCircular.. .

=d /dt=d /dt

v ra

= d /dtv

w qa w

Dynamics(Why?)

Think (physics)Ch 5 - 8

= a Fnet

1m