What is the minimum speed, relative to the Sun, necessary for a spacecraft to escape the solar system if it starts at the Earth's orbit?

Please tell me what formula

Vesc = sqrt[2µ/r] where µ = the gravitational constant of the Sun = 1.46872x10^21 ft^3/sec^2 and r = the average radius of Earth's orbit = 93x10^6 miles.

Therefore, Vesc = sqrt[2(1.468772x10^21/(93x10^6x5280) = 138,177ft/sec.

Since the Earth is already traveling at an average orbital speed of 97,706ft/sec., a rocket must provide a burnout velocity increment of 40,471ft/sec. in order to escape the solar system.

You might find the following of some interest.

In order to escape the gravitaional pull exerted by a central body on an orbiting object, it must must achieve a minimum inertial velocity relative to the central body. This velocity is called the escape velocity. You can determine the minimal escape velocity required to escape from any planet yourself. Escape velocity from a planet is given by Ve = sqrt[2µ/r] where Ve = escape velocity in feet per second, µ = the planet's gravitational constant, ft.^3/sec.^2 (equal to GM where G = the Universal Gravitational Constant and M = the mass of the planet), and r = the radial distance from the center of the planet in feet. For the earth, µ = 1.407974x10^16 and r = 3963 miles = 20,924,640 ft. so the general escape velocity, direct from the surface, would be Ve = sqrt[2(1.407974x10^16)]/20,924,640 = ~36,685 ft./sec. = ~25,007 mph.
For Mars, with a µ = 1.512819x10^15 and r = 2111 miles, escape velocity from the surface is ~11,231 mph.
If you were launching an interplanetary probe from Cape Canaveral, Florida, onto a direct escape trajectory, you would only have to add a velocity increment of ~23,969 mph to the probe as the earth's rotational velocity at the latitude of the launch site would contribute ~1038 mph of initial velocity to the probe when launched in the due east direction (This is the reason why launch sites want to be as near to the equator as possible). Most space probes are launched into a low altitude circular parking orbit before being sent on their journey, typically around 100 miles altitude. The launch vehicle must then deliver the probe to the 100 mile altitude with a final velocity of ~25,940 fps = ~17682 mph having again picked up ~1038 mph of velocity from the launch site. Having separated from the launch vehicle and been checked out by ground controllers, the probe can now be launched on its journey. The final escape velocity now required will be less than that required direct from the earth's surface due to the increase in radial distance from the center of the earth. The spacecraft is already circling the earth at 17,682 mph and must now add a velocity increment of ~7,015 mph to reach a final escape velocity of ~24,700 mph from this altitude.
It is worth noting that a spacecraft given this minimal escape velocity will end up on a parabolic trajectory which will ultimately take it to the edge of the earth's sphere of influence (~575,000 miles) with zero velocity, where it will remain forever. Thus, to send a spacecraft on an interplanetary journey, or place it in a heliocentric orbit around the sun, it must be given a final velocity in excess of minimum parabolic escape velocity. Doing so would place a spacecraft on a hyperbolic trajectory which would reach the edge of the earth's sphere of influence with a residual velocity, which when added to the earth's velocity around the sun, would place it on a heliocentric orbit around the sun. Perhaps an example will help you to understand.
Lets assume that we want to launch a probe to Mars. The time for a space probe, launched from Earth, to reach the planet Mars, or any planet for that matter, is a function of the location of the planets relative to one another at the time of launch, the final velocity of departure from earth orbit, and the velocity direction, at burnout of the rocket stage. The exact phasing and distances of the planets from each other, dictates the required magnitude and direction of the velocity. There are fundamentally two extremes to examining the time required to travel to a planet in a direct planet to planet flight. One requires a minimal expenditure of rocket energy but results in the longest trip time. The other requires a huge expenditure of rocket energy but results in a shorter trip time, relatively speaking. The minimum energy time is ~259 days (assuming the average radii of the earth's and Mar's orbits) while the fast track approach could get you there as fast as 70 days or less, depending on the final burnout velocity of the rocket stage. It is also possible to launch at a non-optimum phasing of the planets and take longer than the 259 days, such as the Mars Global Surveyor, which reportedly took ~10 months to arrive at Mars. The Pathfinder spacecraft reportedly took a fast track trajectory, reaching Mars in ~7 months, on July 4, 199. The following will hopefully shed some additional light on the subject for you.
The minimum energy approach for a probe to reach any planet on its own is by means of the Hohmann transfer Orbit. By minimum energy, I mean the lowest possible final velocity of the probe as it departs its earth orbit. The Hohmann Transfer Orbit (HTO) is an elliptical orbit that is tangent to both of the orbits of the planets between which the transfer is to be made. In other words, a probe placed into a heliocentric orbit about the Sun would leave the influence of the earth with a velocity vector tangent to the earth's orbit and arrive at the destination planet's orbit with a velocity vector tangent to its orbit. One of the focii of this elliptical orbit is the Sun and the orbit is tangent to both the Earth's orbit and the target planet's orbit.
Lets explore what it takes to send a space probe to our planet in question. Lets assume a launch vehicle has already placed our probe and its auxiliary rocket stage in a circular, 250 mile high, low Earth orbit (LEO) with the required orbital velocity of 25,155 feet per second, fps.
By definition, a probe being launched on a journey to another planet, must be given sufficient velocity to escape the gravitational pull of Earth. As stated above, a probe that is given exactly escape velocity, will depart the Earth on a parabolic trajectory, and just barely escape the gravitational field. This means that its velocity will be approaching zero as its distance from the center of the Earth approaches infinity. If however, we give our probe more than minimal escape velocity, it will end up on a hyperbolic trajectory and with some finite residual velocity as it approaches infinity, or the edge of the sphere of influence. This residual velocity that the probe retains is called the "hyperbolic excess velocity." When added to the velocity of the Earth in its orbit about the Sun, the result is the heliocentric velocity required to place the probe on the correct Hohmann transfer trajectory to rendezvous with Mars.
It is again worth noting that it is somewhat naive to talk about a space probe reaching infinity and escaping a gravitational field completely. It is somewhat realistic, however, to say that once a probe has reached a great distance (on the order of 500,000 to one million miles) from Earth, it has, for all intensive purposes, escaped. At these distances, it has already slowed down to very near its hyperbolic excess velocity. It has therefore become convenient to define an imaginary sphere surrounding every gravitational body as the body's "sphere of influence", SOI. When a space probe passes through this SOI, it is said to have truly escaped. Over the years, it has become difficult to get any two people to agree on exactly where the SOI should be located but,
nevertheless, the ficticious boundry is widely used in preliminary lunar and interplanetary trajectory studies. It is usually taken as ~575,000 miles.
As stated earlier, a probe that departs from a 250 mile high LEO with the minimal escape velocity of 36,605 feet per second will end up at the edge of the Earth's SOI with near zero velocity and remain there forever. We must then give our probe a final Earth departure velocity in excess of minimal escape velocity. Lets back into this required velocity in the following manner.
The final heliocentric velocity required by our probe for a Hohmann transfer to Mars is ~107,350 fps, relative to the Sun. Since the probe, at the beginning of its journey, picks up and retains the velocity of the Earth about the Sun (97,700 fps), we can subtract this from our required heliocentric velocity to determine our required hyperbolic excess velocity. Thus, 107,350 - 97,700 = 9,650 fps, the hyperbolic excess velocity required by our probe at the edge of the Earth's SOI. To achieve this hyperbolic excess velocity, on the hyperbolic escape trajectory from our 250 mile parking orbit, requires a final rocket burnout velocity of 36,890 fps, relative to the Earth. The velocity vector must nominally be perpendicular to the radius from the Sun, through the center of the Earth and parallel to the Earth's direction around the Sun. Since our circular parking orbit velocity is already 25,155 fps, we need therefore only add a velocity increment (deltaV) of 11,735 fps with our auxiliary rocket stage burn.
Our launch vehicle has already delivered us to our 250 mile LEO. The auxiliary stage now fires, imparting its impulsive velocity which it escapes the Earth altogether. The journey would take ~259 days to travel the 180 degrees around the Sun and arrive in the vicinity of Mars. Using the more exact perihelion and aphelion distances for Mars, ~128,416,000 miles and ~154,868,000 miles, and 93,000,000 miles for the earth's distance from the sun, the Hohmann Transfer trip times would be ~238 days and ~281 days respectively. Obviously, the phasing of the planets is important for this type of transfer and the launch must occur at a carefully predetermined time such that both Mars, and the probe, will reach the heliocentric rendezvous vicinity at the same time.

Further Reading Reference:
1--Rockets, Missiles, & Space Travel by Wiley Ley, The Viking Press, 1958.

To calculate the minimum speed required for a spacecraft to escape the solar system from Earth's orbit, we can utilize the concept of escape velocity. The formula for escape velocity can be derived from the equation for gravitational potential energy. Here's the step-by-step calculation:

1. Start with the equation for gravitational potential energy:

PE = -G * ((m1 * m2) / r)

Where:
PE = Gravitational potential energy
G = Universal gravitational constant (approximately 6.67430 × 10^(-11) m^3 kg^(-1) s^(-2))
m1 = Mass of the sun
m2 = Mass of the spacecraft
r = Distance between the center of the sun and the spacecraft

2. Set the gravitational potential energy equal to the initial kinetic energy of the spacecraft (1/2 * m2 * v^2), considering that the initial velocity is assumed to be zero:

PE = 1/2 * m2 * v^2

3. Equate the gravitational potential energy to the initial kinetic energy and solve for velocity (v):

-G * ((m1 * m2) / r) = 1/2 * m2 * v^2

Here, the masses of the sun (m1) and the spacecraft (m2) cancel out, simplifying the equation:

-G * (1 / r) = 1/2 * v^2

Rearranging the equation:

v^2 = (2 * G * (1 / r))

4. To obtain the minimum speed, we take the square root of both sides of the equation:

v = sqrt(2 * G * (1 / r))

This is the formula to calculate the minimum speed necessary for a spacecraft to escape the solar system, relative to the Sun.

Note: The escape velocity can vary depending on the desired level of escape. In this case, we assumed escaping the gravitational influence of the Sun entirely.

To determine the minimum speed necessary for a spacecraft to escape the solar system from Earth's orbit, you can use the concept of escape velocity.

Escape velocity is the minimum velocity an object needs to overcome the gravitational pull of a celestial body and escape its gravitational field. The formula for escape velocity is:

v = √(2 × G × M / r)

Where:
v is the escape velocity
G is the gravitational constant (approximately 6.67430 × 10^-11 m^3 kg^-1 s^-2)
M is the mass of the celestial body (in this case, the Sun)
r is the distance between the center of the celestial body and the spacecraft (in this case, Earth's average distance from the Sun)

In this scenario, we assume that the spacecraft starts at Earth's orbit. Earth has an average distance from the Sun of approximately 149.6 million kilometers (93 million miles), which is commonly represented as 1 astronomical unit (AU) or 1.496 x 10^8 kilometers.

By plugging in the values into the formula, we can calculate the minimum speed:

v = √(2 × 6.67430 × 10^-11 × 1.989 × 10^30 / 1.496 × 10^8)

Simplifying and solving this equation will give us the minimum speed needed to escape the solar system from Earth's orbit relative to the Sun.