# 0.11 Phy1080: motion -- variable velocity and acceleration  (Page 8/19)

 Page 8 / 19

## Variable velocity exercise #2

Estimating variable velocity with a computer model

Let's write a script that approximates the graphic procedure that I described earlier.

Please copy the code from Listing 2 into an html file and open the file in your browser.

Listing 2 . Variable velocity exercise #2.
```<!---------------- File JavaScript2.html ---------------------><html><body><script language="JavaScript1.3">document.write("Start Script</br>"); //Declare and initialize constantsvar g = -32.2;//acceleration of gravity in ft/sec/sec var v0 = 100;//initial velocity in ft/secvar h0 = 6;//initial height in feet var tInc = 0.25;//calculation interval in seconds//Declare and initialize working variables var t = .0001;//current time in secondsvar h = h0;//current height in feet var v = 0;//current velocity in feet/secvar oldT = 0;//previous time in seconds var delT = 0;//change in time in secondsvar oldH = h0;//previous height in feet var delH = 0;//change in height in feet//The following variable is used to insert spaces in // the output display.var sp = "&nbsp;&nbsp;&nbsp;&nbsp;" //Compute and display various values for as long as the// height of the projectile is above the ground. while(h>0){ //This is the general equation for the height of a// projectile under the influence of gravity in a // vacuum.h = h0 + v0*t +0.5*g*t*t; //Compute and save the time interval since the// previous estimate of height, etc. delT = t-oldT;oldT = t;//Save the current time for the next iteration //Estimate the velocity based on the change in// height since the previous estimate. delH = h-oldH;v = delH/delT;//compute velocity oldH = h;//Save the current height for the next iteration.//Display the information for this iteration document.write("t = " + t.toFixed(2) + " seconds" + sp +" h = " + h.toFixed(1) + " feet" + sp + " v = " + v.toFixed(2) + " feet/second" + sp +"</br>"); //Increment the time for the next iteration.t = t + tInc; }//end while loopdocument.write("End Script");</script></body></html>```

Screen output

The text shown in Figure 6 should appear in your browser window when the html file opens in your browser.

Figure 6 . Screen output for Listing #2.
```Start Script t = 0.00 seconds h = 6.0 feet v = 100.00 feet/secondt = 0.25 seconds h = 30.0 feet v = 95.97 feet/second t = 0.50 seconds h = 52.0 feet v = 87.92 feet/secondt = 0.75 seconds h = 72.0 feet v = 79.87 feet/second t = 1.00 seconds h = 89.9 feet v = 71.82 feet/secondt = 1.25 seconds h = 105.8 feet v = 63.77 feet/second t = 1.50 seconds h = 119.8 feet v = 55.72 feet/secondt = 1.75 seconds h = 131.7 feet v = 47.67 feet/second t = 2.00 seconds h = 141.6 feet v = 39.62 feet/secondt = 2.25 seconds h = 149.5 feet v = 31.57 feet/second t = 2.50 seconds h = 155.4 feet v = 23.52 feet/secondt = 2.75 seconds h = 159.2 feet v = 15.47 feet/second t = 3.00 seconds h = 161.1 feet v = 7.42 feet/secondt = 3.25 seconds h = 160.9 feet v = -0.63 feet/second t = 3.50 seconds h = 158.8 feet v = -8.68 feet/secondt = 3.75 seconds h = 154.6 feet v = -16.73 feet/second t = 4.00 seconds h = 148.4 feet v = -24.78 feet/secondt = 4.25 seconds h = 140.2 feet v = -32.83 feet/second t = 4.50 seconds h = 130.0 feet v = -40.88 feet/secondt = 4.75 seconds h = 117.7 feet v = -48.93 feet/second t = 5.00 seconds h = 103.5 feet v = -56.98 feet/secondt = 5.25 seconds h = 87.2 feet v = -65.03 feet/second t = 5.50 seconds h = 69.0 feet v = -73.08 feet/secondt = 5.75 seconds h = 48.7 feet v = -81.13 feet/second t = 6.00 seconds h = 26.4 feet v = -89.18 feet/secondt = 6.25 seconds h = 2.1 feet v = -97.23 feet/second t = 6.50 seconds h = -24.2 feet v = -105.28 feet/secondEnd Script```

can someone help me with some logarithmic and exponential equations.
20/(×-6^2)
Salomon
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
Salomon
I'm not sure why it wrote it the other way
Salomon
I got X =-6
Salomon
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
Commplementary angles
hello
Sherica
im all ears I need to learn
Sherica
right! what he said ⤴⤴⤴
Tamia
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
a perfect square v²+2v+_
kkk nice
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
or infinite solutions?
Kim
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Al
y=10×
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
rolling four fair dice and getting an even number an all four dice
Kristine 2*2*2=8
Differences Between Laspeyres and Paasche Indices
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
is it 3×y ?
J, combine like terms 7x-4y
im not good at math so would this help me
yes
Asali
I'm not good at math so would you help me
Samantha
what is the problem that i will help you to self with?
Asali
how do you translate this in Algebraic Expressions
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!