Solving complex mathematical problems