Skip to content

Instantly share code, notes, and snippets.

@rich-hart
Created February 24, 2015 17:04
Show Gist options
  • Save rich-hart/a71aa17ae3f2b296ab4d to your computer and use it in GitHub Desktop.
Save rich-hart/a71aa17ae3f2b296ab4d to your computer and use it in GitHub Desktop.
unittest_report
#!/bin/bash
mkdir development
cd development
virtualenv .
git clone https://github.com/Connexions/cnx-query-grammar.git
cd cnx-query-grammar && ../bin/python setup.py install && cd ..
git clone https://github.com/Connexions/cnx-epub.git
cd cnx-epub && ../bin/python setup.py install && cd ..
git clone -b master https://github.com/Connexions/plpydbapi.git
cd plpydbapi && ../bin/python setup.py install && cd ..
git clone https://github.com/Connexions/rhaptos.cnxmlutils.git
cd rhaptos.cnxmlutils && ../bin/python setup.py install && cd ..
git clone https://github.com/Connexions/cnx-authoring.git
cd cnx-authoring && ../bin/python setup.py install && cp development.ini.example development.ini && createdb -U postgres -O cnxauthoring authoring && ../bin/cnx-authoring-initialize_db development.ini && cd ..
git clone https://github.com/Connexions/cnx-archive.git
cd cnx-archive && ../bin/python setup.py install && createdb -U postgres -O cnxarchive cnxarchive && ../bin/cnx-archive-initdb --with-example-data development.ini && cd ..
git clone https://github.com/Connexions/cnx-publishing.git
cd cnx-publishing && ../bin/python setup.py install && createdb -O cnxarchive cnxarchive-testing && ../bin/cnx-publishing-initdb development.ini && cd ..
cd ..
======================================================================
FAIL: test_cnxml_abstract (cnxarchive.tests.test_database.MiscellaneousFunctionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/testing.py", line 70, in wrapped
return method(self, cursor, *args, **kwargs)
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/test_database.py", line 134, in test_cnxml_abstract
'A link to an <link document="m42092" version="1.4">interal document</link>.')
AssertionError: 'A link to an <a href="/contents/d395b566-5fe3-4428-bcb2-19016e3aa3ce">interal document<' != 'A link to an <link document="m42092" version="1.4">interal document</link>.'
======================================================================
FAIL: test_cnxml_content (cnxarchive.tests.test_database.MiscellaneousFunctionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/testing.py", line 70, in wrapped
return method(self, cursor, *args, **kwargs)
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/test_database.py", line 233, in test_cnxml_content
self.assertIn("<document", cursor.fetchone()[0])
AssertionError: '<document' not found in '<body xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:mod="http://cnx.rice.edu/#moduleIds" xmlns:bib="http://bibtexml.sf.net/" xmlns:data="http://dev.w3.org/html5/spec/#custom"><div>Displacement</div><div><ul>\n<li>Define position, displacement, distance, and distance traveled.</li>\n<li>Explain the relationship between position and displacement.</li>\n<li>Distinguish between displacement and distance traveled.</li>\n<li>Calculate displacement and distance given initial position, final position, and the path between the two.</li>\n</ul></div>\n \n \n <figure id="import-auto-id2723149"><figcaption>These cyclists in Vietnam can be described by their position relative to buildings and a canal. Their motion can be described by their change in position, or displacement, in the frame of reference. (credit: Suzan Black, Fotopedia)</figcaption><c:media xmlns:m="http://www.w3.org/1998/Math/MathML" id="import-auto-id2717961" alt="Three people cycling along a canal. The blurred buildings in the background convey a sense of motion of the cyclists.">\n <img src="Figure_02_01_00.jpg" media-type="image/jpg" alt="Three people cycling along a canal. The blurred buildings in the background convey a sense of motion of the cyclists." width="300"/>\n </c:media>\n\n </figure><section depth="1" id="fs-id3178358"><c:title xmlns:m="http://www.w3.org/1998/Math/MathML">Position</c:title>\n<p id="import-auto-id1572700">In order to describe the motion of an object, you must first be able to describe its <c:term xmlns:m="http://www.w3.org/1998/Math/MathML">position</c:term>&#8212;where it is at any particular time. More precisely, you need to specify its position relative to a convenient reference frame. Earth is often used as a reference frame, and we often describe the position of an object as it relates to stationary objects in that reference frame. For example, a rocket launch would be described in terms of the position of the rocket with respect to the Earth as a whole, while a professor&#8217;s position could be described in terms of where she is in relation to the nearby white board. (See <a href="#import-auto-id2972079">[link]</a>.) In other cases, we use reference frames that are not stationary but are in motion relative to the Earth. To describe the position of a person in an airplane, for example, we use the airplane, not the Earth, as the reference frame. (See <a href="#import-auto-id2707699">[link]</a>.)</p></section>\n<section depth="1" id="fs-id2572460"><c:title xmlns:m="http://www.w3.org/1998/Math/MathML">Displacement</c:title>\n <p id="import-auto-id3310684">If an object moves relative to a reference frame (for example, if a professor moves to the right relative to a white board or a passenger moves toward the rear of an airplane), then the object&#8217;s position changes. This change in position is known as <c:term xmlns:m="http://www.w3.org/1998/Math/MathML">displacement</c:term>. The word &#8220;displacement&#8221; implies that an object has moved, or has been displaced. </p><c:note xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3206000" label=""><c:title>Displacement</c:title>\n <p id="import-auto-id2986917">Displacement is the <em effect="italics">change in position</em> of an object:</p><c:equation id="eip-458"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mrow><mrow><mrow><mtext>&#916;</mtext><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo>,</mo></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mtext>&#916;</mtext><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo>,</mo></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{&#916;x=x rSub { size 8{f} } - x rSub { size 8{0} } } {}</annotation></semantics></annotation-xml></semantics></math></c:equation><p id="import-auto-id2795085">where <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mtext>&#916;</mtext><mi fontstyle="italic">x</mi></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mtext>&#916;</mtext><mi fontstyle="italic">x</mi></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{&#916;x} {}</annotation></semantics></annotation-xml></semantics></math> is displacement, <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x rSub { size 8{f} } } {}</annotation></semantics></annotation-xml></semantics></math> is the final position, and <em effect="italics"/><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x rSub { size 8{0} } } {}</annotation></semantics></annotation-xml></semantics></math> is the initial position. </p></c:note>\n <p id="import-auto-id2804940">In this text the upper case Greek letter <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mtext>&#916;</mtext></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mtext>&#916;</mtext></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{&#916;} {}</annotation></semantics></annotation-xml></semantics></math> (delta) always means &#8220;change in&#8221; whatever quantity follows it; thus, <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mtext>&#916;</mtext><mi>x</mi></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mtext>&#916;</mtext><mi>x</mi></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{&#916;x} {}</annotation></semantics></annotation-xml></semantics></math> means <em effect="italics">change in position</em>. Always solve for displacement by subtracting initial position <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x rSub { size 8{0} } } {}</annotation></semantics></annotation-xml></semantics></math> from final position <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x rSub { size 8{f} } } {}</annotation></semantics></annotation-xml></semantics></math>.</p><p id="import-auto-id2880746">Note that the SI unit for displacement is the meter (m) (see <a href="/m42091">Physical Quantities and Units</a>), but sometimes kilometers, miles, feet, and other units of length are used. Keep in mind that when units other than the meter are used in a problem, you may need to convert them into meters to complete the calculation.</p><p id="import-auto-id3310887">\n <figure id="import-auto-id2972079"><figcaption>A professor paces left and right while lecturing. Her position relative to Earth is given by <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mi>x</mi></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mi>x</mi></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x} {}</annotation></semantics></annotation-xml></semantics></math>. The <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><mo stretchy="false">+</mo><mn>2</mn></mrow><mtext>.</mtext><mn>0</mn><mi/><mspace width="0.25em"/><mtext>m</mtext></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><mo stretchy="false">+</mo><mn>2</mn></mrow><mtext>.</mtext><mn>0</mn><mi/><mspace width="0.25em"/><mtext>m</mtext></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{+2 "." 0`m} {}</annotation></semantics></annotation-xml></semantics></math> displacement of the professor relative to Earth is represented by an arrow pointing to the right.</figcaption><c:media xmlns:m="http://www.w3.org/1998/Math/MathML" id="import-auto-id2819371" alt="The initial and final position of a professor as she moves to the right while writing on a whiteboard. Her initial position is 1 point 5 meters. Her final position is 3 point 5 meters. Her displacement is given by the equation delta x equals x sub f minus x sub 0 equals 2 point 0 meters.">\n <img src="Figure_02_01_01.jpg" media-type="image/jpg" alt="The initial and final position of a professor as she moves to the right while writing on a whiteboard. Her initial position is 1 point 5 meters. Her final position is 3 point 5 meters. Her displacement is given by the equation delta x equals x sub f minus x sub 0 equals 2 point 0 meters." width="300"/>\n </c:media>\n\n </figure></p>\n <figure id="import-auto-id2707699"><figcaption>A passenger moves from his seat to the back of the plane. His location relative to the airplane is given by <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mi>x</mi></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mi>x</mi></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x} {}</annotation></semantics></annotation-xml></semantics></math>. The <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><mo stretchy="false">&#8722;</mo><mn>4</mn></mrow><mtext>.</mtext><mn>0</mn><mtext>-m</mtext></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><mo stretchy="false">&#8722;</mo><mn>4</mn></mrow><mtext>.</mtext><mn>0</mn><mtext>-m</mtext></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{ - 4 "." 0"-m"} {}</annotation></semantics></annotation-xml></semantics></math> displacement of the passenger relative to the plane is represented by an arrow toward the rear of the plane. Notice that the arrow representing his displacement is twice as long as the arrow representing the displacement of the professor (he moves twice as far) in <a href="#import-auto-id2972079">[link]</a>.</figcaption><c:media xmlns:m="http://www.w3.org/1998/Math/MathML" id="import-auto-id2873026" alt="View of an airplane with an inset of the passengers sitting inside. A passenger has just moved from his seat and is now standing in the back. His initial position was 6 point 0 meters. His final position is 2 point 0 meters. His displacement is given by the equation delta x equals x sub f minus x sub 0 equals 4 point zero meters.">\n <img src="Figure_02_01_02.jpg" media-type="image/jpg" alt="View of an airplane with an inset of the passengers sitting inside. A passenger has just moved from his seat and is now standing in the back. His initial position was 6 point 0 meters. His final position is 2 point 0 meters. His displacement is given by the equation delta x equals x sub f minus x sub 0 equals 4 point zero meters." width="455"/>\n </c:media>\n\n </figure><p id="import-auto-id2815802">Note that displacement has a direction as well as a magnitude. The professor&#8217;s displacement is 2.0 m to the right, and the airline passenger&#8217;s displacement is 4.0 m toward the rear. In one-dimensional motion, direction can be specified with a plus or minus sign. When you begin a problem, you should select which direction is positive (usually that will be to the right or up, but you are free to select positive as being any direction). The professor&#8217;s initial position is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub><mo stretchy="false">=</mo><mn>1</mn></mrow><mtext>.</mtext><mn>5</mn><mi/><mspace width="0.25em"/><mtext>m</mtext></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub><mo stretchy="false">=</mo><mn>1</mn></mrow><mtext>.</mtext><mn>5</mn><mi/><mspace width="0.25em"/><mtext>m</mtext></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x rSub { size 8{0} } =1 "." 5`m} {}</annotation></semantics></annotation-xml></semantics></math> and her final position is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub><mo stretchy="false">=</mo><mn>3</mn></mrow><mtext>.</mtext><mn>5</mn><mi/><mspace width="0.25em"/><mtext>m</mtext></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mtext>f</mtext></mrow></msub><mo stretchy="false">=</mo><mn>3</mn></mrow><mtext>.</mtext><mn>5</mn><mi/><mspace width="0.25em"/><mtext>m</mtext></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x rSub { size 8{f} } =3 "." 5`m} {}</annotation></semantics></annotation-xml></semantics></math>. Thus her displacement is </p><c:equation xmlns:m="http://www.w3.org/1998/Math/MathML" id="eip-556"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mrow><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><msub><mi>x</mi><mn>f</mn></msub><mrow><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo stretchy="false">=</mo><mn>3</mn></mrow><mtext>.5 m</mtext><mo stretchy="false">&#8722;</mo><mn>1.5 m </mn><mo stretchy="false">=</mo><mo stretchy="false">+</mo><mn>2</mn><mtext>.0 m</mtext></mrow><mo>.</mo></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><msub><mi>x</mi><mn>f</mn></msub><mrow><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo stretchy="false">=</mo><mn>3</mn></mrow><mtext>.5 m</mtext><mo stretchy="false">&#8722;</mo><mn>1.5 m </mn><mo stretchy="false">=</mo><mo stretchy="false">+</mo><mn>2</mn><mtext>.0 m</mtext></mrow><mo>.</mo></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{&#916;x=x"" lSub { size 8{f} } - x rSub { size 8{0} } =3 "." 5`m - 1 "." 5`"m "= +2 "." "0 m"} {}</annotation></semantics></annotation-xml></semantics></math></c:equation><p id="import-auto-id1373168">In this coordinate system, motion to the right is positive, whereas motion to the left is negative. Similarly, the airplane passenger&#8217;s initial position is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub><mo stretchy="false">=</mo><mn>6</mn></mrow><mtext>.</mtext><mn>0 m</mn></mrow></mrow></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub><mo stretchy="false">=</mo><mn>6</mn></mrow><mtext>.</mtext><mn>0 m</mn></mrow></mrow></mrow></semantics></annotation-xml></semantics></math> and his final position is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub><mo stretchy="false">=</mo><mn>2</mn></mrow><mtext>.</mtext><mn>0 m</mn></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub><mo stretchy="false">=</mo><mn>2</mn></mrow><mtext>.</mtext><mn>0 m</mn></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x rSub { size 8{f} } =2 "." 0`m} {}</annotation></semantics></annotation-xml></semantics></math>, so his displacement is </p><c:equation xmlns:m="http://www.w3.org/1998/Math/MathML" id="eip-778"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mrow><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><msub><mi>x</mi><mn>f</mn></msub><mrow><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo stretchy="false">=</mo><mn>2</mn></mrow><mtext>.</mtext><mn>0 m</mn><mo stretchy="false">&#8722;</mo><mn>6</mn><mtext>.</mtext><mn>0 m</mn><mo stretchy="false">=</mo><mrow><mo stretchy="false">&#8722;</mo><mn>4</mn></mrow><mtext>.</mtext><mn>0 m</mn></mrow><mo>.</mo></mrow></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><msub><mi>x</mi><mn>f</mn></msub><mrow><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo stretchy="false">=</mo><mn>2</mn></mrow><mtext>.</mtext><mn>0 m</mn><mo stretchy="false">&#8722;</mo><mn>6</mn><mtext>.</mtext><mn>0 m</mn><mo stretchy="false">=</mo><mrow><mo stretchy="false">&#8722;</mo><mn>4</mn></mrow><mtext>.</mtext><mn>0 m</mn></mrow><mo>.</mo></mrow></mrow><annotation encoding="StarMath 5.0"> size 12{&#916;x=x"" lSub { size 8{f} } - x rSub { size 8{0} } =2 "." 0`m - 6 "." 0`m= - 4 "." 0`m} {}</annotation></semantics></annotation-xml></semantics></math></c:equation><p id="import-auto-id3579333">His displacement is negative because his motion is toward the rear of the plane, or in the negative <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mi>x</mi></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mi>x</mi></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{x} {}</annotation></semantics></annotation-xml></semantics></math> direction in our coordinate system. </p>\n </section>\n<section depth="1" id="fs-id1414454"><c:title xmlns:m="http://www.w3.org/1998/Math/MathML">Distance</c:title>\n <p id="import-auto-id3580245">Although displacement is described in terms of direction, distance is not. <c:term xmlns:m="http://www.w3.org/1998/Math/MathML">Distance</c:term> is defined to be <em effect="italics">the magnitude or size of displacement between two positions</em>. Note that the distance between two positions is not the same as the distance traveled between them. <c:term xmlns:m="http://www.w3.org/1998/Math/MathML">Distance traveled</c:term> is <em effect="italics">the total length of the path traveled between two positions</em>. Distance has no direction and, thus, no sign. For example, the distance the professor walks is 2.0 m. The distance the airplane passenger walks is 4.0 m. </p><c:note xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3044492" label=""><c:title>Misconception Alert: Distance Traveled vs. Magnitude of Displacement</c:title>\n <p id="import-auto-id2850966">It is important to note that the <em effect="italics">distance traveled</em>, <em effect="italics"/>however, can be greater than the magnitude of the displacement (by magnitude, we mean just the size of the displacement without regard to its direction; that is, just a number with a unit). For example, the professor could pace back and forth many times, perhaps walking a distance of 150 m during a lecture, yet still end up only 2.0 m to the right of her starting point. In this case her displacement would be +2.0 m, the magnitude of her displacement would be 2.0 m, but the distance she traveled would be 150 m. In kinematics we nearly always deal with displacement and magnitude of displacement, and almost never with distance traveled. One way to think about this is to assume you marked the start of the motion and the end of the motion. The displacement is simply the difference in the position of the two marks and is independent of the path taken in traveling between the two marks. The distance traveled, however, is the total length of the path taken between the two marks.</p></c:note>\n\n<c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3589986" label=""><c:title>Check Your Understanding</c:title>\n<c:problem id="fs-id2996632">\n<p id="import-auto-id3225677">A cyclist rides 3 km west and then turns around and rides 2 km east. (a) What is her displacement? (b) What distance does she ride? (c) What is the magnitude of her displacement?</p>\n</c:problem>\n<c:solution id="fs-id1711333">\n<figure id="import-auto-id2776946"><c:media id="import-auto-id2928776" alt="Two diagrams side by side. To the left is a horizontal line, or x axis, with points for final position and initial position. Displacement 1, shown by an arrow pointing leftward, equals negative 3 kilometers. Displacement 2, shown by an arrow pointing rightward, equals 2 kilometers. To the right is a pair of x and y axes, showing that east is the positive x direction and west is the negative x direction.">\n<img src="Figure_02_01_03.jpg" media-type="image/jpg" alt="Two diagrams side by side. To the left is a horizontal line, or x axis, with points for final position and initial position. Displacement 1, shown by an arrow pointing leftward, equals negative 3 kilometers. Displacement 2, shown by an arrow pointing rightward, equals 2 kilometers. To the right is a pair of x and y axes, showing that east is the positive x direction and west is the negative x direction." width="350"/></c:media></figure><p id="import-auto-id3297899">(a) The rider&#8217;s displacement is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow></mrow><mo>=</mo><mtext>&#8722;1 km</mtext></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow></mrow><mo>=</mo><mtext>&#8722;1 km</mtext></mrow></mrow><mrow/></mrow></semantics></annotation-xml></semantics></math>. (The displacement is negative because we take east to be positive and west to be negative.)</p><p id="import-auto-id2585055">(b) The distance traveled is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mrow><mtext>3 km </mtext><mo stretchy="false">+</mo><mtext> 2 km </mtext></mrow><mo stretchy="false">=</mo><mtext> 5 km</mtext></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mrow><mtext>3 km </mtext><mo stretchy="false">+</mo><mtext> 2 km </mtext></mrow><mo stretchy="false">=</mo><mtext> 5 km</mtext></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{"3 km "+" 2 km "=" 5 km"} {}</annotation></semantics></annotation-xml></semantics></math>.</p>\n <p id="import-auto-id2892639">(c) The magnitude of the displacement is <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mn>1 km</mn></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mn>1 km</mn></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{1" km"} {}</annotation></semantics></annotation-xml></semantics></math>.</p></c:solution> \n</c:exercise></section>\n<section depth="1" id="fs-id2758854"><c:title xmlns:m="http://www.w3.org/1998/Math/MathML">Section Summary</c:title><ul id="fs-id2005363"><li>Kinematics is the study of motion without considering its causes. In this chapter, it is limited to motion along a straight line, called one-dimensional motion.</li> \n <li>Displacement is the change in position of an object.</li>\n <li>In symbols, displacement <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi></mrow><mrow/></mrow></semantics></annotation-xml></semantics></math> is defined to be\n <c:equation xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id2929393"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo>,</mo></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mn>&#916;</mn><mi fontstyle="italic">x</mi><mo stretchy="false">=</mo><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub><mo stretchy="false">&#8722;</mo><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow><mo>,</mo></mrow></mrow><mrow/></mrow></semantics></annotation-xml></semantics></math></c:equation>\nwhere <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><msub><mi>x</mi><mrow><mn>0</mn></mrow></msub></mrow></mrow></semantics></annotation-xml></semantics></math> is the initial position and <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><msub><mi>x</mi><mrow><mn>f</mn></mrow></msub></mrow><mrow/></mrow></semantics></annotation-xml></semantics></math> is the final position. In this text, the Greek letter <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mn>&#916;</mn></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mn>&#916;</mn></mrow><mrow/></mrow></semantics></annotation-xml></semantics></math> (delta) always means &#8220;change in&#8221; whatever quantity follows it. The SI unit for displacement is the meter (m). Displacement has a direction as well as a magnitude.</li> \n <li>When you start a problem, assign which direction will be positive.</li>\n <li>Distance is the magnitude of displacement between two positions.</li>\n <li>Distance traveled is the total length of the path traveled between two positions.</li>\n </ul></section><section depth="1" id="fs-id2075470"><c:title xmlns:m="http://www.w3.org/1998/Math/MathML">Conceptual Questions</c:title>\n <c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id1704056"><c:problem id="fs-id1942381">\n<p id="import-auto-id2774216">Give an example in which there are clear distinctions among distance traveled, displacement, and magnitude of displacement. Specifically identify each quantity in your example. </p>\n </c:problem></c:exercise>\n <c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3147584"><c:problem id="fs-id1702540">\n<p id="import-auto-id1414240">Under what circumstances does distance traveled equal magnitude of displacement? What is the only case in which magnitude of displacement and displacement are exactly the same? </p>\n </c:problem></c:exercise>\n <c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3563423"><c:problem id="fs-id2781126">\n<p id="import-auto-id2173366">Bacteria move back and forth by using their flagella (structures that look like little tails). Speeds of up to <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mtext fontstyle="normal">50 &#956;m/s </mtext><mspace width="0.25em"/><mfenced open="(" close=")"><mrow><mrow><mtext>50</mtext><mo stretchy="false">&#215;</mo><msup><mtext>10</mtext><mrow><mrow><mo stretchy="false">&#8722;</mo><mn>6</mn></mrow></mrow></msup></mrow><mspace width="0.25em"/><mtext> m/s</mtext></mrow></mfenced></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mtext fontstyle="normal">50 &#956;m/s </mtext><mspace width="0.25em"/><mfenced open="(" close=")"><mrow><mrow><mtext>50</mtext><mo stretchy="false">&#215;</mo><msup><mtext>10</mtext><mrow><mrow><mo stretchy="false">&#8722;</mo><mn>6</mn></mrow></mrow></msup></mrow><mspace width="0.25em"/><mtext> m/s</mtext></mrow></mfenced></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{"50 &#956;m/s " left ("50" times "10" rSup { size 8{ - 6} } " m/s" right )} {}</annotation></semantics></annotation-xml></semantics></math> have been observed. The total distance traveled by a bacterium is large for its size, while its displacement is small. Why is this? </p></c:problem></c:exercise>\n </section>\n <section depth="1" id="fs-id3417389"><c:title xmlns:m="http://www.w3.org/1998/Math/MathML">Problems &amp; Exercises</c:title>\n <figure id="import-auto-id2076702"><c:media xmlns:m="http://www.w3.org/1998/Math/MathML" id="import-auto-id2778378" alt="An x axis starts at 0 meters and ends at 12 meters. There are four points on the graph with displacement paths. Path A starts at 0 and stops at 7. Path B starts at 12 and ends at 7. Path C starts at 2, goes to 10, turns around and goes back to 8, then turns around again and stops at 11. Path D starts at 9, goes to 3, then turns around and stops at 5.">\n <img src="Figure_02_01Sol_01.jpg" media-type="image/jpg" alt="An x axis starts at 0 meters and ends at 12 meters. There are four points on the graph with displacement paths. Path A starts at 0 and stops at 7. Path B starts at 12 and ends at 7. Path C starts at 2, goes to 10, turns around and goes back to 8, then turns around again and stops at 11. Path D starts at 9, goes to 3, then turns around and stops at 5." width="250"/>\n </c:media>\n </figure><c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id1126076"><c:problem id="fs-id3312138"> <p id="import-auto-id3748212">Find the following for path A in <a href="#import-auto-id2076702">[link]</a>: (a) The distance traveled. (b) The magnitude of the displacement from start to finish. (c) The displacement from start to finish.</p></c:problem>\n<c:solution id="fs-id1551519">\n <p xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" id="import-auto-id3043406" fo:font-weight="normal">(a) 7 m</p>\n <p xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" id="import-auto-id2791328" fo:font-weight="normal">(b) 7 m</p>\n <p id="import-auto-id3197117">(c) <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mo stretchy="false">+</mo><mn>7 m</mn></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mo stretchy="false">+</mo><mn>7 m</mn></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{+7`m} {}</annotation></semantics></annotation-xml></semantics></math></p></c:solution>\n </c:exercise>\n <c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id2823990"><c:problem id="fs-id2804044"> <p id="import-auto-id1703980">Find the following for path B in <a href="#import-auto-id2076702">[link]</a>: (a) The distance traveled. (b) The magnitude of the displacement from start to finish. (c) The displacement from start to finish.</p></c:problem></c:exercise>\n <c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id4292134"><c:problem id="fs-id2811336"> <p id="import-auto-id4358788">Find the following for path C in <a href="#import-auto-id2076702">[link]</a>: (a) The distance traveled. (b) The magnitude of the displacement from start to finish. (c) The displacement from start to finish.</p></c:problem>\n<c:solution id="fs-id2791412">\n <p xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" id="import-auto-id2714801" fo:font-weight="normal">(a) 13 m</p>\n <p xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" id="import-auto-id3149061" fo:font-weight="normal">(b) 9 m</p>\n <p id="import-auto-id2572623">(c) <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mrow><mrow><mrow><mo stretchy="false">+</mo><mn>9 m</mn></mrow></mrow><mrow/></mrow></mrow><annotation-xml encoding="MathML-Content"><semantics><mrow><mrow><mrow><mo stretchy="false">+</mo><mn>9 m</mn></mrow></mrow><mrow/></mrow><annotation encoding="StarMath 5.0"> size 12{+9`m} {}</annotation></semantics></annotation-xml></semantics></math></p></c:solution>\n </c:exercise>\n <c:exercise xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3242594"><c:problem id="fs-id1470371"> <p id="import-auto-id2811759">Find the following for path D in <a href="#import-auto-id2076702">[link]</a>: (a) The distance traveled. (b) The magnitude of the displacement from start to finish. (c) The displacement from start to finish.</p></c:problem></c:exercise>\n </section>\n \n <div><h2>Glossary</h2>\n <c:definition xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id1580711"><c:term>kinematics</c:term> <c:meaning id="fs-id1426394">the study of motion without considering its causes</c:meaning></c:definition>\n <c:definition xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3059259"><c:term>position</c:term> <c:meaning id="fs-id1415754">the location of an object at a particular time</c:meaning></c:definition>\n <c:definition xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id2979435"><c:term>displacement</c:term> <c:meaning id="fs-id3222890">the change in position of an object</c:meaning></c:definition>\n <c:definition xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id3151040"><c:term>distance</c:term> <c:meaning id="fs-id3215864">the magnitude of displacement between two positions</c:meaning></c:definition>\n <c:definition xmlns:m="http://www.w3.org/1998/Math/MathML" id="fs-id1548772"><c:term>distance traveled</c:term> <c:meaning id="fs-id1411294">the total length of the path traveled between two positions</c:meaning></c:definition>\n </div></body>'
======================================================================
FAIL: test_html_abstract (cnxarchive.tests.test_database.MiscellaneousFunctionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/testing.py", line 70, in wrapped
return method(self, cursor, *args, **kwargs)
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/test_database.py", line 114, in test_html_abstract
'A link to an <a href="/contents/d395b566-5fe3-4428-bcb2-19016e3aa3ce@4">interal document</a>.</div>')
AssertionError: 'A link to an <a href="/m42092">interal document</a>.</div>' != 'A link to an <a href="/contents/d395b566-5fe3-4428-bcb2-19016e3aa3ce@4">interal document</a>.</div>'
======================================================================
FAIL: test_html_abstract_deprecated (cnxarchive.tests.test_database.MiscellaneousFunctionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/testing.py", line 70, in wrapped
return method(self, cursor, *args, **kwargs)
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/test_database.py", line 89, in test_html_abstract_deprecated
'A link to an <a href="/contents/d395b566-5fe3-4428-bcb2-19016e3aa3ce@4">interal document</a>.</div>')
AssertionError: 'A link to an <a href="/m42092">interal document</a>.</div>' != 'A link to an <a href="/contents/d395b566-5fe3-4428-bcb2-19016e3aa3ce@4">interal document</a>.</div>'
======================================================================
FAIL: test_module_files_from_html (cnxarchive.tests.test_database.ModulePublishTriggerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/testing.py", line 70, in wrapped
return method(self, cursor, *args, **kwargs)
File "/Users/openstax/workspace/openstax_scripts/development/cnx-archive/cnxarchive/tests/test_database.py", line 849, in test_module_files_from_html
html)
AssertionError: 'Image: <span data-type="media"><img src="/resources/d47864c2ac77d80b1f2ff4c4c7f1b2059669e3e9/Figure_01_00_01.jpg" data-media-type="image/jpeg" alt=""/></span>' not found in '<div xmlns:c="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:mod="http://cnx.rice.edu/#moduleIds" xmlns:bib="http://bibtexml.sf.net/" xmlns:data="http://dev.w3.org/html5/spec/#custom">Image: <span data-type="media"><img src="Figure_01_00_01.jpg" data-media-type="image/jpeg" alt=""/></span></div>'
----------------------------------------------------------------------
Ran 233 tests in 351.300s
FAILED (failures=5, skipped=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment