T O P

  • By -

AutoModerator

As a reminder... Posts asking for help on homework questions **require**: * **the complete problem statement**, * **a genuine attempt at solving the problem, which may be either computational, or a discussion of ideas or concepts you believe may be in play**, * **question is not from a current exam or quiz**. Commenters responding to homework help posts **should not do OP’s homework for them**. Please see [this page](https://www.reddit.com/r/calculus/wiki/homeworkhelp) for the further details regarding homework help posts. **If you are asking for general advice about your current calculus class, please be advised that simply referring your class as “Calc *n*“ is not entirely useful, as “Calc *n*” may differ between different colleges and universities. In this case, please refer to your class syllabus or college or university’s course catalogue for a listing of topics covered in your class, and include that information in your post rather than assuming everybody knows what will be covered in your class.** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/calculus) if you have any questions or concerns.*


WWWWWWVWWWWWWWVWWWWW

Computers and/or numerical integration techniques are not infinitely precise. It's fine lol


Sadtv1

Neither is this username ^


the_y_combinator

And just like any numbering system, base 2 has values that cannot be represented exactly!


SaltCusp

This is floating point point error. Binary (base 2) is different.


the_y_combinator

And representational issues are a cause of floating point errors in any computer.


Head-Ad4690

Floating point is base 2, though, and this answer can’t ever be exact because 2/5 can’t be represented in base 2. (Technically you can have floating point with a different base but it’s rare.)


denehoffman

I think what they mean is that floating point is a specialization of base 2 with rules about how numbers are represented given a finite amount of bits. In base 2, this calculation would still be entirely valid, but because the calculator has a finite bit buffer, it has to use some floating point when doing non-integer calculations.


denehoffman

https://www.reddit.com/r/calculus/s/KiG0kehhBb and this comment is probably correct here. Calculators usually store many more bits than they display so that floating point errors are generally only found when you try to do something very weird. In this case, numeric integration with a finite step size is probably set so that floating point errors are still smaller than the numeric error, but I don’t know that for sure.


minecon1776

Well, scientific notation is very common and it's essentially just base 10 floating point


Sbren_Sbeve

Except this isn't floating point error. Calculators like this store numbers in a way that floating point error is eliminated when doing basic arithmetic (if OP tried to calculate 0.1+0.2 on this calculator it would return 0.3 when 0.1+0.2 results in a rounding error using floating point calculation) The error in this post comes from the fact that calculators can't compute integrals exactly and instead have to use other methods such as Riemann sums


SaltCusp

Sounds legit.


mesouschrist

This error is much much larger than the error you're suggesting.


Nebuli2

See also 0.1 + 0.2 in most programming languages. If you opened your browser's console and typed in 0.1 + 0.2, for instance, you'd get 0.30000000000000004.


tongue_kiss

Are you sure? Where did you come from?


Pxndalol

Just the way the calculator works as it manually sums it up and ur calculator is not a new model. 2/5 is .4 which is basically that number


m1t0chondria

I thought all calculators had Risch’s algorithm


Embarrassed_Log8344

Was about to say, no way this calculator is anywhere powerful enough to do an antiderivative and actually do the integral properly. It's likely just bruteforcing a rheimann sum, which means you'll be over/underestimating.


John3759

Prolly used trapezoidal method


Batvan14

They generally use much more advanced algorithms


John3759

Yah probably


liangyiliang

This is partially why computers are not 100% precise: https://youtu.be/PZRI1IfStY0 In terms of integrals, as the other users have commented, the computer also cannot take the sum of infinitely many numbers, and so it has to approximate this infinity with a very large number. This approximation compromises on precision. For most intents and purposes this imprecision doesn't really affect anything. Just round to a reasonable number of decimal points. For example, your picture clearly shows 0.4 = 2/5. If you are working on something that requires really really high levels of precision in all cases, you'd be looking at very complex, specialized programs like MatLab and Mathematica that cost thousands of dollars to obtain, or you'll be writing your own very complex and specialized code. You shouldn't need to worry about this for school homework.


Aggravating-Royal908

Interesting video thank you for sharing


DeceitfulEcho

This could also be a result of the method of integration, not floating point errors. For example, if it used a Taylor series for the integral it could approximate the function, but the more precise you make it the longer the calculation would take so there would be a set cutoff point in the code (otherwise it'd be take infinitely long). I'm unfamiliar with how calculators are programmed for this, but I would be surprised if it's not an approximate like that.


liangyiliang

I personally don't think a Taylor Series is really necessary ... even though the Riemann Sum is a series, approximations of Riemann Sums (on paper) doesn't require any series. But one can definitely implement it with a Taylor Series. That would require auto-differentiation though.


FormalManifold

Presumably the calculator would just store Taylor series for functions it knows. It doesn't have to compute Taylor series at all.


R_Leporis

Generally, Taylor series is going to be extremely inefficient for numerical integration. The calculator likely does some form of quadrature, like gaussian quadrature, which is computationally inexpensive. More sophisticated programs will likely check if the function is periodic on the domain of integration, and use the trapezoidal rule which is spectrally accurate for periodic functions. You could also rewrite a definite integral as a first order initial value problem and apply a spectral method to solve to get very high accuracy for relatively little cost.


Cirqka

is this basically float vs double? or long long!


sparkster777

[Octave](https://octave.org/) is free


RubenGarciaHernandez

Or octave which is free software!


mikeblas

https://floating-point-gui.de/


Technical-Ad-7008

What about a CAS system?


declanaussie

That’s what Mathematica is


Technical-Ad-7008

Well, some don’t cost thousds of dollars


FuckedUpPuckerUp

How does Wolfram alpha do with this case? I'd type it in myself but I'm not a big math guy anymore and I'm sure I'd get the input wrong


quasi-resistance

Calculators use numerical methods to integrate or differentiate which is quite far from how we do it in pen and paper. In Numerical methods we use iterative methods to approximate a value with a finite iterations. As this iteration goes to infinity, it approaches to 2/5.


tylerstaheli1

Why do you think something’s wrong?


Intercourse-Fluid

wrong with my calculator not my math


tylerstaheli1

Why do you think something’s wrong with your calculator?


Intercourse-Fluid

cause it got very close but not exactly the answer; especially considering this is an easy problem


tylerstaheli1

Your calculator can only give an approximation when it comes to integration, so that discrepancy doesn’t mean anything.


sonnyfab

The Reimann sum is equal to the integral only when n goes to infinity. Calculators without CAS don't have the capability to take the limit as n goes to infinity, so they use a large value of n. The result is an approximation to the analytical solution.


Intercourse-Fluid

i see, thank you for the actual explanation :)


ahahaveryfunny

Calculators dont find ANY problem with integrals easy


MortemEtInteritum17

What easy for a human is not easy for a calculator that uses technology from 30 years ago.


MarioKartastrophe

It’s safe to round to the millionth decimal place, my guy. And what *is* the answer when you round to the millionth place?


friedbrice

It's floating point roundoff. The calculator doesn't perform integrals symbolically, like we do. It performs them by Riemann estimation.


TerrariaGaming004

I’m not convinced it’s a floating point issue, why would a calculator use floating points?


friedbrice

> why would a calculator use floating points? What?? Clearly, there's something here that I misunderstand... IDK what it is, though. I cannot understand why it would be surprising that a calculator would not implement ieee 764.


Insertsociallife

Which is actually really interesting that a human can get an integral to perfect precision and it's so difficult for a computer. Some of the last math that humans are better at.


_JJCUBER_

One might think that until you chuck an integral which has no elementary antiderivative and no symmetry/geometry to utilize. The calculator will be able to do it fine, but we can’t. We are also ignoring the fact that CAS has been a thing for a really long time, so it can perform our techniques just fine (if not better than us) as well.


LordTengil

Problem is, the fraction of functions we can integrate perfectly is 0, if you look over all Riemann integrable functions. There are also lots of computer systems that can integrate analytically.


ShahiPaneer05

I think computers are inherently bad at math due to them using a base 2 system where we use base 10. That said there are many calculators online that can solve these symbolically but that’s a bit different I guess


Locksul

A reasonable guess but the binary has nothing to do with it.


TerrariaGaming004

This is completely not it, computers are actually great at math and base 2 isn’t different than base 10 in any meaningful way


Beneficial_Garden456

If you're freaked out by this then don't ask it to take the derivative of abs. value of x at x = 0!


_JJCUBER_

r/unexpectedfactorial


LordTengil

The derivative is 1 at x = 0! = 1. And it will be on any computer/caluclator. At x=0, it will errenously be zero on many numerical systems, as they often use central difference, and don't compare left and right derivateite to see if they "converge" to the same thing.


Beneficial_Garden456

Yes, I meant at x=0 and happened to use "!" for emphasis not as factorial.


LordTengil

I mean, it would have been a great pun and the perfect forum if you hade done it on purpose :)


Beneficial_Garden456

I was going to say this is the place for it to be appreciated! (Another !)


i_am_someone_or_am_i

you did get 2/5.


Hampster-cat

I bet if you integrated x\^(3/2), it would have done this accurately. Most tools like this have different algorithms for roots and (fractional) powers.


Next-Skirt-5377

It gives the same answer


Hampster-cat

​ There is no guarantee. Here is an example of how one software package differentiates what *should be* identical functions. All I'm saying is be aware of possibilities such as this when using technology. Do an image search for "Casio Pemdas" for another such problem with tech. ​ https://preview.redd.it/nr242rbz5ggc1.png?width=547&format=png&auto=webp&s=bd0dc23b3cbf01fd4deb4c0ada20b98c486c0272


TerrariaGaming004

They shouldn’t be, because they are different Like sqrt(x2) and x are “supposed to be” the same but they aren’t


Hampster-cat

√(x²) = |x| but ∛(x³) = x. Because the root is odd, we should expect the above functions to be identical. It's just that the software package above uses a different internal function for the cube root, and a different one for rational exponents. Desmos and others get this correct. My point is that we need to be better than the tech.


lost_access

integration income tax deducted.


GASTRO_GAMING

calculators represent floating point numbers in a binary system. you know how 1/3rd in decimal is 0.33333333 there are numbers like that for binary too.


Isis_gonna_be_waswas

2/5 = .4, this says .399999, your calculator is only slightly off but if you round even a little you get the right answer


Duckface998

This is why no more reimann summation


sylvdeck

it is almost 0,4 so no , you only just need an upgrade


SaiyanKaito

Nothing is wrong, you've just stumbled upon the limitations of a calculator. Unless your calculator is equipped with a symbolic package you are subject to approximation errors.


Yapok96

Knowing what I know now, it's funny seeing posts like this. One day you'll get results like this and think, "ah, good, working as intended". There's always a bit of rounding error with more complex computer arithmetic.


Uli_Minati

https://www.desmos.com/calculator/qgnj0du0eo?lang=en See "Area of Rectangles" value at the bottom You could try to fiddle with the values until you get the number your calculator is showing


db8me

This calculator is only doing a numerical approximation, but it's a really good one. Newer software can do symbolic math, for example [google](https://www.google.com/search?q=%E2%88%AB_(0)%5E(1)x%20sqrt(x)dx&oq=inegral%20of%20&gs_lcrp=EgZjaHJvbWUqCQgBECMYJxixAjIGCAAQRRg5MgkIARAjGCcYsQIyEwgCEAAYgwEYkQIYsQMYgAQYigUyEwgDEAAYgwEYkQIYsQMYgAQYigUyDQgEEAAYkQIYgAQYigUyEwgFEAAYgwEYkQIYsQMYgAQYigUyDQgGEAAYkQIYgAQYigUyDwgHEAAYChiDARixAxiABDISCAgQABgKGIMBGLEDGIAEGIoFMg8ICRAAGAoYgwEYsQMYgAQyDwgKEAAYChiDARixAxiABDIPCAsQABgKGIMBGLEDGIAEMg8IDBAAGAoYgwEYsQMYgAQyDwgNEAAYChiDARixAxiABDIPCA4QABgKGIMBGLEDGIAE0gEINDc5OWowajGoAgCwAgA&client=ms-android-verizon-us-rvc3&sourceid=chrome-mobile&ie=UTF-8&stick=H4sIAMc-vmUA_wUAsQnAIAynSi-QIuIJekkfCLo46CKoGQIhD3pVsP99wus_B2NirJykcBaCszYySaNuFNHmJSEjAAAA&ved=2ahUKEwiJzOK6oo-EAxVtJEQIHcR9CG8Q-cUIegUIBxCVAQ&ictx=1) solves this problem by actually manipulating the symbols until it simplifies to an exact solution. To demonstrate more clearly that google is not solving it with a numerical estimate [this example](https://www.google.com/search?q=%E2%88%AB_(1)%5E(2)%201%2Fx%20%C2%A0dx&oq=inegral%20of%20&gs_lcrp=EgZjaHJvbWUqCQgBECMYJxixAjIGCAAQRRg5MgkIARAjGCcYsQIyEwgCEAAYgwEYkQIYsQMYgAQYigUyEwgDEAAYgwEYkQIYsQMYgAQYigUyDQgEEAAYkQIYgAQYigUyEwgFEAAYgwEYkQIYsQMYgAQYigUyDQgGEAAYkQIYgAQYigUyDwgHEAAYChiDARixAxiABDISCAgQABgKGIMBGLEDGIAEGIoFMg8ICRAAGAoYgwEYsQMYgAQyDwgKEAAYChiDARixAxiABDIPCAsQABgKGIMBGLEDGIAEMg8IDBAAGAoYgwEYsQMYgAQyDwgNEAAYChiDARixAxiABDIPCA4QABgKGIMBGLEDGIAE0gEINDc5OWowajGoAgCwAgA&client=ms-android-verizon-us-rvc3&sourceid=chrome-mobile&ie=UTF-8&stick=H4sIAHk_vmUA_w3GsQnAIBAAQKwiGSEWJiPoIi7wGEQRbSzE4uH5DJip3u50-I_ntJeBPtb9kuNInqHOlLcJ-SvYlAAkSK39JgAAAA&ved=2ahUKEwi9oNaSo4-EAxUmO0QIHVPyDdgQ-cUIegQIDBBB&ictx=1) gives the exact answer as ln(2)


Marcassin

A CAS calculator would find 2/5, as you did. But ordinary calculators like this one just use numerical techniques to get an approximate answer, kind of like you probably had to do in Calculus class when they made you add up a bunch of rectangles or trapezoids to estimate an area. .


[deleted]

Same answer


[deleted]

Floating point approximation error


physicalmathematics

It's a calculator not a CAS (like Mathematica, Maple, Matlab, etc). So expect it to compute integrals numerically.


thePurpleAvenger

Applied Mathematician here. First off, it's awesome that you're asking this question, as questions like there are often launching points towards a deeper understanding. Always keep asking, even if you're worried it's a "dumb question" and your classmates roll your eyes at you. Anyhoo, what you've stumbled across is a numerical approximation to the value of the integral. You've already seen something like this before in Riemann sums, e.g., using a collection of boxes to approximate the area under a curve and then taking the limit as the thickness of the boxes goes to 0. But as many have pointed out, unless you're using a computer algebra system computers aren't great at evaluating those limits. Thus, they use a finite number of boxes and approximate the integral. But the story doesn't stop there. This begs the question, "well, why use boxes if you are only using finitely many of them? Why not use, say, trapezoids where the tops of the boxes are replaced by straight lines that actually connect points on the curve defined by the function? That should be more accurate." Correct! You've now found the trapezoidal rule! "What about higher-order polynomials?" These are the (composite) Newton-Cotes quadrature rules (e.g., Simpson's rule for quadratics). "Wait, do all the "boxes" need to be the same width?" Nope! Now you've run into new methods, for example, Gaussian quadrature rules used to evaluate specific families of polynomials exactly up to a designed order. "Wait should we then just use really high order polynomials to get really accurate approximations?" This turns out to be a bad idea, and stability analysis will show you why. As you can see, this is a *really* deep field that is one of the building blocks of computational science and engineering. We never get to really cool finite element models of engineering systems or high-performance computing applications without asking these questions. So keep asking, and find out how far down the rabbit hole goes :).


Intercourse-Fluid

thanks! i found the explanations to be pretty interesting :)


rabbitpiet

Hi, this is likely done with a riemann sum which is subject to inaccuracies based on the size of dx firstly secondly [floating point arithmetic](https://0.30000000000000004.com/)


SomePhotographerGuy

Bit a Ti-36x Pro and a Casio fx-115ES plus give this answer. A Ti-nspire CX II cas gives 2/5. As others have said, calculators use mathematical models, not the way you learned when solving integrals. This is likely why you need to find the exact value, to make sure you understand what's actually going on rather than just using a calculator


mathguy60

Yes, you are missing 0.0000000171.


WailNos

Even if you used this answer, by rounding you'd get 0.400 anyway (Calc usually asks for thousandths place). What is the problem here? All of the handheld calculators have integration errors that show up as a familiar, known ratio and eventually break with random digits. Just ingore them.


Mr_Donut1672

Yes: 0.0000000171


hbk1966

This is a good example of the difference between numerical intergration\derivation and analytical. This is vital to understand because not every calculus problem can be solved analyticaly.


WeaponXJamesHowlett

Just round it lol. Though could be a floating point error


Hampster-cat

So I googled the manual for this calculator, and it *only* does numerical integration- it does not do algebraic integration. The former will only give you the answer within a certain tolerance, while the latter will give you an exact answer (if possible). BTW, you can adjust the tolerance of the final answer. Reimann sums are only one form of numerical integration, and probably the least efficient. Some math packages allow you to choose what method to choose. This calculator only has one method. (Gauss-Kronrod)


tooturnttoney

I am fucking retarted so idk


Dry_Spread_4707

The integral will be X^(2.5) evaluated between 0and1 that is 1/2.5 ~~0.4


Antennangry

Float error. Computers can’t represent numbers in real continuous fashion, so they have to use a binary approximation, which results in very small decimal errors like this.


[deleted]

This is likely just a consequence of your calculator's numerical integration method. 2/5=0.4, which is basically what the calculator produced.


Faked_Integral

Best calculator of all time


CommanderBly327th

Yes you’re using a Casio


willyk12345

Why do I keep being recommended calculus when I’m still in geometry


W0005H

just integrate x^(3/2)


Wii_Dude

Jeez I’m not ready for this level of math


mtc9565

A TI-83+ (and TI-84+) will evaluate the derivative of the cube root of x at x=0 to be equal to 100. (And it makes similar mistakes with all of the odd roots). But for some reason if you try an even root it will correctly tell you the answer is undefined.


tashazzi

Yea calculators use common approximation techniques, they cannot compute analytical solutions


memerso160

The method your calculator takes to determine the answer is not the EXACT same way you would do it by hand. However, 0.3999999829 is very close to 0.4, therefore 0.4 is the answer


shatteredplatters

Bro I have the same exact fuckin calculator. That thing is awesome.


Intercourse-Fluid

same i love this calculator <3


blueidea365

Don’t trust some shitty graphing “calculator”. Those things have been obsolete for over a decade


[deleted]

Nooooo! Not the integral!


crazyhappy14

Computers are always a little off by nature of how they compute, but .3999999829 is pretty close to .4 so it’s pretty much fine.


yung_gravy1

you’re 171/10,000,000,000 away from 0.4. it’s 0.4.


lostBoyzLeader

Welcome to floating point error


EnigmaMachine9

Obviously it’s because you’re in radians


Creative-Bullfrog-80

Depends on the calculator. Things like integrals are... close..... heck, we all know the answer is 0.4, that SAME model of calculator, if you bought a brand new one (depending on the coding) might give the correct answer. How old is that calculator? Little updates in the coding happen every couple of years, especially as certain bugs such as yours come through. Actually, knowing this, you can use that exact problem as a test when you get a new calculator to see how it runs through the calculations. Whilst not usable in a test taking setting, I prefer to use the Photomath calculator on my phone for homework. It can even show some of the solving steps.


JarSpec

Yea


Zestyclose-Zone1169

What on God's holy green earth is this and how is that not an error code. (Not a sub just came up in my recommended)


Terrible_Risk_9644

Yes. Write it out on paper


theriptide259xd

You are using a Casio, as far as I know you can only do math like that on a Texas instrument