Graphs of sin and cos, how to set points for x values

I am at the topic on graphing trigonometric functions. Exercises are rather easy at this point, but I have a problem deciphering how authors of the book choose points for x values. Please, take a look at few examples (including screen shots I attach), and, please, help me to understand the pattern.

2. Relevant equations
In all of the following examples the task is to find the period, amplitude, phase shift and vertical shift, and graph at least on cycle. I am making the accent only on x values, as it is easy to compute y values, and there are no problems with those. I would like to understand the pattern for choosing x values.

So to graph the authors have chosen the following values of x:
• π / 8 is chosen as the first x value, because, I presume, we should start the cycle at the point of the phase shift (of course, we can start the cycle anywhere, but here the task is to practice graphs' shifts);
• next x value π/8 + π/8 = π/4;
• next x value π/4 + π/8 = 3π/8;
• next x value 3π/8 + π/8 = π/2;
• next x value π/2 + π/8 = 5π/8;

at this point we finished one cycle with π/2 period, which started at π/8 and finished at 5π/8
Therefore each x value is increased by π/8, which happens to be the value of the phase shift.

A zero of cosine is at π/2. Set the input of cos equal to π/2 and solve for x.
Likewise and a maximum is at 0. Set the input of cos equal to 0 and solve for x.
Those will give you some good x values to use.

A zero of cosine is at π/2. Set the input of cos equal to π/2 and solve for x.
Likewise and a maximum is at 0. Set the input of cos equal to 0 and solve for x.
Those will give you some good x values to use.

Thank you! You reminded me that to find the x values I have to equate angles's values (those in brackets for cos or sin) to 0, π/2, π, etc values to get suitable x values for the graph. :)