Let's call the distance the man originally walks "D" kilometers and his original walking speed "S" kilometers per hour.
According to the given information:
If he walks 1/2 km an hour faster, he takes 1 hour less.
This can be represented as:
Time taken at original speed - Time taken at faster speed = 1 hour
D / S - D / (S + 1/2) = 1
If he walks 1 km an hour slower, he takes 3 more hours.
This can be represented as:
Time taken at original speed + 3 hours = Time taken at slower speed
D / S + 3 = D / (S - 1)
Now, we have a system of two equations with two unknowns:
Equation 1: D / S - D / (S + 1/2) = 1
Equation 2: D / S + 3 = D / (S - 1)
Let's solve this system of equations:
From Equation 1:
D / S - D / (S + 1/2) = 1
Multiply both sides by S(S + 1/2) to eliminate the denominators:
D(S + 1/2) - DS = S(S + 1/2)
D(S + 1/2) - DS = S^2 + (1/2)S
Now, simplify:
D(S + 1/2 - S) = S^2 + (1/2)S
D(1/2) = S^2 + (1/2)S
D/2 = S^2 + (1/2)S
D = 2(S^2 + (1/2)S) -----(Equation 3)
Now, let's work with Equation 2:
D / S + 3 = D / (S - 1)
Multiply both sides by S(S - 1) to eliminate the denominators:
D(S - 1) + 3S(S - 1) = D(S)
DS - D + 3S^2 - 3S = DS
Now, simplify:
D + 3S^2 - 3S = 0
D = 3S^2 - 3S -----(Equation 4)
Now, we have two equations, Equation 3 and Equation 4, both representing D in terms of S. We can set them equal to each other since they both equal D:
2(S^2 + (1/2)S) = 3S^2 - 3S
Now, let's solve for S:
2S^2 + S = 3S^2 - 3S
Rearrange and collect like terms:
2S^2 - 3S^2 + S + 3S = 0
-S^2 + 4S = 0
Factor out an S:
S(-S + 4) = 0
Now, we have two possible solutions:
S = 0 (but this doesn't make sense in the context of walking speed)
-S + 4 = 0
Solve for S in the second equation:
-S + 4 = 0
-S = -4
S = 4
So, the original walking speed (S) is 4 kilometers per hour.
Now, we can find the distance (D) using Equation 3:
D = 2(S^2 + (1/2)S)
D = 2(4^2 + (1/2)(4))
D = 2(16 + 2)
D = 2(18)
D = 36 kilometers
Therefore, the man originally walked a distance of 36 kilometers at a speed of 4 kilometers per hour.