- #1
member 428835
Just like the title says. Is this due to roundoff?
jedishrfu said:Can't you illustrate it with a simpler example?
Its well known in computerdom that some numbers can't be represented properly in floating pt format so if Mathematica does a numerical computation with them them then computational error will creep into the calculation.
As an example, if you had some expression like ##3.0*sin(x)*(1.0/3.0)## and Mathematica symbolically reduces it to sin(x) then that result might be different from ##(3.0*sin(x)) / 3.0## where Mathematica didn't see the ONES identity and did the numerical computations of 3.0 * sin(x) then dividing by 3.0.
For larger numbers the result difference might be more pronounced as floating pt numbers kep to a certain limited digit precision.
Decimals and fractions represent numbers differently. Decimals have a fixed number of decimal places, while fractions have a numerator and denominator. This difference in representation leads to different integrals because the integration process involves manipulating the variable in the equation, and decimals and fractions are treated differently in this process.
Integrating a fraction involves finding the antiderivative of the function, while integrating a decimal involves converting it to a fraction and then finding the antiderivative. This extra step in converting decimals to fractions can result in different integrals.
Yes, there are cases where decimals and fractions can give the same integral. This typically occurs when the decimal can be simplified to a fraction or when the decimal is a repeating decimal that can be expressed as a fraction.
Using decimals can sometimes make integration easier and more efficient, as decimals can often be converted to fractions with simple calculations. Additionally, decimals can provide more precise results compared to fractions, which can be important in certain scientific applications.
Yes, there are situations where using fractions may be more beneficial for integration. For example, when dealing with irrational numbers or functions with complex denominators, it may be easier to work with fractions rather than decimals. Additionally, some integration techniques, such as partial fractions, work better with fractions.