moving in a straight line, but variable speed

So I am moving a car in a straight line but I want it to accelerate up to a maximum speed. I am thinking that animationCurve is a good way to go, but am not exactly sure how to execute this. How would I set up an animationCurve and use it to drive the car's transform?

Expanding a bit:

at t=0 sec, xPosition = 0 at t=1 sec, xPosition = 0.5 at t=2 sec, xPosition = 1.5 at t=3 sec, xPosition = 4.5

... and so on. Was thinking these values for t and xPosition would simply represent the keyFrames in an accelerationCurve. Does this sound right? If so, could anyone throw together some quick code to show me how to do this?

Thanks!

Hmm, that sounds like a terrible idea. To accelerate up to a maximum velocity, I would make the car object a rigidbody and do something like this (very basic example):

var accel : float = 3.0;
var maxSpeed : float = 30.0;

function FixedUpdate(){
    if(rigidbody.velocity.magnitude < maxSpeed)
        rigidbody.AddForce(Vector3.forward*accel);
}