Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Translate the entire conversation x

limit sought

AlfredFlaßhaar
15-Moonstone

limit sought

I recently received the following task from a competition:
Calculate lim(n-->oo) [n*integral(from 0; to 1) (x^n/(x^n+x+2024)].

Using derive, MC15 and Maple I got three different solutions. Can Mathcad solve this task?
(Solution: 0.0004937...)

ACCEPTED SOLUTION

Accepted Solutions

The equivalent function g(n), which is obtained by substituting y=x^n, is numerically much more stable!

Werner_E_0-1739552907851.png

Nonetheless, Symbolics is still unable to find an exact symbolic solution when applying the limit

Werner_E_1-1739553391798.png

However, it is possible to do it this way

Werner_E_2-1739553425888.png

which of course is equivalent to

Werner_E_3-1739553447962.png

a basic integral for which we would not need any software 😉

 

 

View solution in original post

12 REPLIES 12

I don't think that Mathcad or Prime are able to arrive at a solution.

The symbolics of both is not able to come up with a solution and the numerics runs into severe round-off errors for higher values of n.

Here the "results" of Mathcad 15 and Prime 10:

Werner_E_0-1739541036617.png

 

Werner_E_2-1739541112428.png

 

 

 

Werner_E
25-Diamond I
(To:Werner_E)

Additional remark:

 

We can improve numerical accuracy significantly by decreasing the value of TOL.
But there will always be a value for n above which numerical inaccuracies will strike and falsely pull the result towards zero.

In case of TOL=10^-10 its the values above n=9449 which yield inaccurate/wrong results.

Werner_E_5-1739543173326.png

 

We can zoom in to see the results approaching the value you named and then the sudden death of the numerics starting with a specific n-value

Werner_E_4-1739543006205.png

If you force the symbolics into numeric float mode by using a decimal like 1.0 instead of just 1, we can get a pretty good approxumation

Werner_E_1-1739550227443.png

I had no luck with much larger arguments, though ('endless' calculation).

 

Also tried Wolfram Alpha, but uncle Wolfram wants us to insert coins to buy more computation time ...

Werner_E_0-1739553925702.png

 

The equivalent function g(n), which is obtained by substituting y=x^n, is numerically much more stable!

Werner_E_0-1739552907851.png

Nonetheless, Symbolics is still unable to find an exact symbolic solution when applying the limit

Werner_E_1-1739553391798.png

However, it is possible to do it this way

Werner_E_2-1739553425888.png

which of course is equivalent to

Werner_E_3-1739553447962.png

a basic integral for which we would not need any software 😉

 

 

I was already familiar with the last solution for reasons based on theorems of analysis. However, since I have little experience in numerics, I wanted to experience the convergence behavior experimentally, live and in color, so to speak ;-). I have now become somewhat aware of the limitations. Thank you very much!

Cornel
19-Tanzanite
(To:Werner_E)

Post delated by author

This is what I got in Maple Fl;ow:

Untitled.png

Werner_E
25-Diamond I
(To:mvenich)

Great!

Can Maple Flow also handle the original expression (in x) before doing the substitution x^n = y ?

mvenich
13-Aquamarine
(To:Werner_E)

Looks like it can't

Untitled2.png

 

Werner_E
25-Diamond I
(To:mvenich)

Disappointing!

You missed the factor n in front of the integral and so I think the limit simply should be zero.

Adding the factor n we get an expression of the form "infinity * zero" with the limit given above.

 

But Maple Flow is not on its own.

Mathcad (15) with muPad can't come up with a solution either

Werner_E_0-1739877541781.png

and Prime 10 with friCAS/Axiom returns an interesting creative solution. Only the second symbolic evaluation is able to simplify the simple integrals in the first result.

Werner_E_1-1739877790882.png

The interesting part is that the correct result "0" is amongst the choices as well as the result for the original task with the additional factor "n".

 

Not absolutely sure what %Z, %Y should denote - guess it means "x" and its a bug that these internal variables shows up in the final result.

Werner_E_2-1739878432514.png

 

 

A theoretical background for this solution must be mentioned here. The solution requires exchanging the limit and the integral. This is permissible for uniformly continuous functions (here the integrand). Fortunately, according to Heine's theorem, this is fulfilled here and according to the so-called commutation theorem, the interchanges are permitted. Software does not check this.

Thanks for the clarification.

 
Swapping integration and limiting was exactly the point where I was unsure whether and under what conditions it was permissible.
 
LucMeekes
23-Emerald III
(To:mvenich)

I tried the original problem in Mathcad 11 as described by Alfred, but it failed.

This one doesn't:

LucMeekes_1-1739902103971.png

Luc

 

Announcements

Top Tags