This question appeared in the 2013 Physics HSC exam as part of Question 23. The solution provided in this paper results in a slightly different answer, although I am unsure as to whether the method used in that paper is still relevant to the current syllabus:
I hope this helps!