http://www.itoim.kspu.ru/matematika/6_2.htm
и
http://www.toehelp.ru/theory/math/lecture19/lecture19.html
Хотя там нет именно такой же задачи!