1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Variable Velocity

  1. Jan 4, 2014 #1
    I've been relearning c++ and my friend gave me a problem to try and solve programmatically. Here is the set up:

    There is a pitcher with a gallon of water.
    The water is being poured out beginning at a rate of 2x milliliters per second.
    x begins at 1 and increases by 1 over 5 seconds.

    The goal is to find out how long it takes to pour out all the water.

    I finished writing a program and got an answer, but unfortunately both me and my friend are quite rusty with our calculus and have no way of checking the answer.

    Could someone possibly provide an answer, or better yet go through the proper way of solving it.
  2. jcsd
  3. Jan 4, 2014 #2


    User Avatar
    2017 Award

    Staff: Mentor

    Does that mean x=1 + t/5?
    WolframAlpha can integrate that (where u is the time in seconds), you just have to set the result equal to the number of milliliters in a gallon (I refuse to calculate with imperial units).

    Or does the flow rate increase in steps (2, 4, 8, ... ml/s)? Then you need a sum.
  4. Jan 4, 2014 #3
    That is correct.
  5. Jan 4, 2014 #4
    dv/dt = 2^x, x=1+(t/5) therefore dv/dt = 2^(1+t/5). Integrate this to find v in terms of t, when t=0, v=0. Use this to find the constant of integration. From this you can sub the volume of a gallon in ml to find the value of t(seconds). I think this should work however the integration may be a little tricky. Thanks Kyle
    Last edited: Jan 4, 2014
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook