The question, answer, solution and my work are attached.

At θ = π/4, I get K = 2/sqrt(2) = 2sqrt(2)/2 != sqrt(2)/4 (which is what the book says it should be).

I feel like I'm not making a mistake but I am very sleepy so I'm really unsure of myself.

If anyone could tell me whether I'm right or wrong and, if I am wrong, explain how to do it correctly, I would greatly appreciate it!

Thanks in advance!