Solve integral without using integration by parts