by ln(x)^2 do you mean (ln(x))2 or ln(x2)? If you meant the second one then your answers should not be different as they are exactly the same, however, if you meant the first then the two functions are not equal and you should not expect equivalent answers.