We divide 511731 by 9
The aim is to understand the frequency of 9 in 511731.

Advancing to step 1:
9 can be fit into 5 0 times, resulting in a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Append the next digit (1) from the dividend to 5 and continue with: 51 / 9

Advancing to step 2:
9 goes into 51 5 times with a remainder of 6.
Write down 5 as next digit of the result. 
Result so far: 5.0
Subtracting 45 from 51 leaves us with 6.
Bring next digit (1) of the dividend behind the 6 and repeat the process: 61 / 9

Step 3:
When dividing 61 by 9, we get 6 with a remainder of 7.
Put 6 as the next digit of the answer. 
Result so far: 56.0
Subtract 54 from 61 to get 7.
Take the next digit (7) from the dividend and append it to 7, then repeat: 77 / 9

Going ahead to step 4:
The number 9 fits into 77 8 times, leaving a remainder of 5.
Put 8 as the next digit of the answer. 
Result so far: 568.0
The remainder is 5 after subtracting 72 from 77.
Grab the next digit (3) from the dividend, add it to 5, then carry on: 53 / 9

Step 5:
9 can be fit into 53 5 times, resulting in a remainder of 8.
The next digit of our result is 5. 
Result so far: 5685.0
If we take 45 away from 53, we end up with 8.
Take the next digit (1) from the dividend and append it to 8, then repeat: 81 / 9

Moving on to step 6:
81 divided by 9 is 9 with a remainder of 0.
Write down 9 as next digit of the result. 
Result so far: 56859.0
Subtracting 81 from 81 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 7:
9 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 56859.0
Subtract 0 from 0 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 8:
If we divide 0 by 9, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 56859.0
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final result is 56859.0 with a remainder of 0.0.