Average Velocity for Constant Acceleration
Calculating average velocity when acceleration is constant
<?xml version="1.0" encoding="UTF-8"?>
<!--Thu Jan 12 2012 18:27:51 GMT-0500 (EST)-->
<XholonWorkbook>
<Notes>
Khan Academy
------------
Title: Average Velocity for Constant Acceleration
Description: Calculating average velocity when acceleration is constant
Url: http://www.khanacademy.org/video/average-velocity-for-constant-acceleration?playlist=Physics
InternalName: average-velocity-for-constant-acceleration
YoutubeId: MAS6mBRZZXA
Keywords: distance, kinematics, average, acceleration, physics
My Notes
========
some conventions for this exercise
positive number means to the right, negative number means to the left
one dimension
Part A
------
vi = 5m/s
a = 2m/s^2
delta t = 4s
a graph with time and velocity axes
slope of the velocity line is a constant acceleration
vf after 4 s
5m/s + delta t * a = 5m/s + 4s * 2m/s = 13m/s
Part B
------
What is the total distance we have traveled? 5:50
the area under the curve on the graph
break the irregularly-shaped area down into 2 different areas
1. rectangular area = 4s * 5m/s = 20m
how far traveled if not accelerating
2. triangular area = 0.5 * 4s * (vf - vi) = 0.5 * 4 * 8 = 16m
how much further because we are accelerating
so the total displacement is 20 + 16 = 36m
distance = delta t * ((0.5 * vi) + (0.5 * vf))
average velocity = 0.5 * (vi + vf)
this works because the acceleration is constant
distance = delta t * average velocity
</Notes>
<script implName="lang:python:inline:"><![CDATA[
# Part A: final velocity
a = 2 # m/s^2
vi = 5 # m/s
dt = 4 # s
vf = vi + dt * a
print "Final velocity = " + str(vf)
# result: Final velocity = 13
#
# Part B: total displacement
averageVelocity = 0.5 * (vi + vf)
displacement = dt * averageVelocity
print "Displacement = " + str(displacement)
# result: Displacement = 36.0
#http://ideone.com/Ns8sJ
]]></script>
<script implName="lang:javascript:inline:"><![CDATA[
// Part A: final velocity
var a = 2; // m/s^2
var vi = 5; // m/s
var dt = 4; // s
var vf = vi + dt * a;
// Part B: total displacement
var averageVelocity = 0.5 * (vi + vf);
var displacement = dt * averageVelocity;
println("Final velocity = " + vf + ", Displacement = " + displacement);
//javascript:(function(a,vi,dt){var vf=vi+dt*a;var averageVelocity=0.5*(vi+vf);var displacement=dt*averageVelocity;alert("Final velocity = "+vf+", Displacement = "+displacement);})(2,5,4)
// result: Final velocity = 13, Displacement = 36
]]></script>
<_-.XholonClass>
<!-- domain objects -->
<PhysicalSystem/>
<Block/>
<!-- quantities -->
<Height superClass="Length"/>
</_-.XholonClass>
<xholonClassDetails>
<Block>
<port name="height" connector="#xpointer(Height)"/>
</Block>
</xholonClassDetails>
<PhysicalSystem>
<Block>
<Height>0.1 m</Height>
</Block>
</PhysicalSystem>
<Blockbehavior implName="lang:python:inline:"><![CDATA[
# This works if pasted in as a last child of Block.
height.incVal(0.02)
print("Python wants something to do. Height:" + str(height))
]]></Blockbehavior>
<Blockbehavior implName="lang:javascript:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
print("JavaScript wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Blockbehavior implName="lang:bsh:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
System.out.print("Java/Beanshell wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Blockbehavior implName="lang:jruby:inline:"><![CDATA[
require 'java'
# This works if pasted in as a last child of Block.
$height.incVal(0.02)
puts "Ruby wants something to do. Height: #{$height}"
]]></Blockbehavior>
<Blockbehavior implName="lang:groovy:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
System.out.print("Groovy wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
</XholonWorkbook>