Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to solve the integral ?(

Status
Not open for further replies.

Georg

New Member
Happy New Year, dear friends !
Would it be possible for you advice me with method to solve this integral:

Xm-upper limit of integral, i.e number
α=const.
 

Attachments

  • integral.jpg
    integral.jpg
    4.3 KB · Views: 317
Happy New Year, dear friends !
Would it be possible for you advice me with method to solve this integral:

Xm-upper limit of integral, i.e number
α=const.

Good day, and happy new year to you as well!

That problem can be broken down into several small parts. For example, behind the integral you see a fraction. This hints that you must use the natural logarithm (dy/dx of ln(x) = 1/x). You can also break the numerator and the denominator down into rules that you know, regarding e for example. After you find the general anti-derivative (integral), you can use the lower and upper limits to find an exact value. Start by breaking the fraction up, apply the rules pertaining to fractions (natural logarithms, etc), powers, and the value 'e'. An even easier way to do it would be using integration by parts.

I would like you to solve this one yourself, which is why I'm not going to far in-depth. Hopefully I've given you a place to start, at least.

Good luck!
Regards,
Matt
 
Happy New Year, dear friends !
Would it be possible for you advice me with method to solve this integral:

Xm-upper limit of integral, i.e number
α=const.

Since this question is in the Math/Physics forum and not the homework section, I assume that there is no guarantee that there is a closed form solution to this integral.

My advice is to do the integration numerically using any of the myriad of mathematic software tools (e.g. Matlab, Mathematical, Maple, Mathcad, Maxima, etc.). This assumes that you will have numbers for Xm and alpha.

There are two logical reasons to follow this course.

First, there is no clear indication that this integral is solvable, and you will most likely need to express the answer in terms of a special integral function (such as one of the Li functions, which are the logarithmic integrals). Use of such functions is just a fancy way of saying, the integral is not solvable and must be numerically integrated. In the old days it made sense to try and express answers in terms of special integral functions, because tables were available, but now you can just crunch it on a computer very fast.

Second, even if I'm wrong and there is a closed form solution, finding it may take more time than it is worth.

Also, if you do insist on using Li functions, then let a symbolic processor spit out the answer for you. You've got better things to do.
 
Last edited:
steveB is quite right in what he says. I couldn't resist trying Mathematica to see what I could get.

The integral does have a closed form solution, involving as steveB said, Li functions (Polylog in Mathematica). I also thought that a series solution might be workable, depending on the value of "a" and Xm. And, as steveB says, if you just want numbers, numerical integration works nicely.

See the attachment. I've plotted the value of the integral for Xm ranging from 0 to 8, with "a" set to a value of 1. For this value of "a", the series looks like it might be useable up to about Xm=4. The blue curve is the result of the numerical integration, and the red curve is the complicated symbolic expression; they are on top of each other.; The green curve is the series expression.
 

Attachments

  • Integral.png
    Integral.png
    23.9 KB · Views: 336
Last edited:
Hello,


I dont consider "closed form" to include any infinite sums, although some people do like to call it that. For example, an integral which has solution consisting of one or more erf() functions i do not consider closed form.

But more important is how we look at numerical solutions. If you do one numerical calculation and take that answer as the final result you could very well have made a big mistake. That's because some numerical solutions are not accurate and can even be unstable. So it's always a good idea to do several calculations and compare results. The generally accepted procedure is to use two different methods and observe that the solution doesnt change much as the chosen method gets intrinsically more accurate.

An example i always like to show is with floating point subtraction (which is part of many numerical algorithms). For example, say we have a numerical storage system that can store three base 10 digits and we have two numbers we want to subtract. And just for example say these two numbers are 1.02 and 1.01, and we are to perform the subtraction 1.02-1.01 and see what result we get and what it means.
First thing to note is that the two numbers are close to a numerical value of 1, and the storage system can handle a number up to nearly 10, so we already are only using one tenth of the bandwidth of the storage available for each number. That's a mere 10 percent.
But ok, lets do the subtraction:
1.02-1.01=0.01
No problem, right?
Well, we got the 'right' answer, but just how 'right' is it really?
First of all, the first number 1.02 was forced into a storage system with only three digits when it was acquired, so that means it could have been as high as 1.029999999 worse case (1.024999999 if we were lucky). The second number was also so forced, so could have been 1.010000000 exactly. So if we had better storage we could have gotten:
1.029-1.01=0.019999999
Comparing the two results, the first was 0.01 and the second was 0.019999999, so the second result was almost two times the first result. An error like this is much too high to ignore in many cases. If we were computing gas mileage we would be getting 20 miles to the gallon yet compute only 10 miles to the gallon. Quite a difference.

But over the years i've come to appreciate numerical analysis because it gives us another way to check our results when using other method including ready made computer solutions using someone else's software.

More to the point, this doesnt look like one of those simpler integrals (as Steve originally pointed out) where we dont easily find a nice neat solution. As with the elliptic integrals and solutions to magnetic fields, we dont always find a nice neat solution except for those rare times when there is a lot of symmetry in the physical set up of the problem.
So what might help is if you could tell us where this problem originated. Was it from a physical problem or was it just some textbook exercise?
 
Last edited:
Hello,


I dont consider "closed form" to include any infinite sums, although some people do like to call it that. For example, an integral which has solution consisting of one or more erf() functions i do not consider closed form.

Does this mean that you don't consider results involving sine, cosine, tangent, exponential or log to be closed form, since they all involve infinite sums?
 
Last edited:
Does this mean that you don't consider results involving sine, cosine, tangent, exponential or log to be closed form, since they all involve infinite sums?

In my view, what you showed is a valid closed form solution, albeit a complicated and somewhat obscure one for most of us engineers.

In my original comment, I was expressing the opinion that the form might be in terms of logarithmic integrals, which I believe would not represent a closed form solution (unless some kind of series form can be shown for those, as well). However, you have shown the answer in terms of the polylog functions, which is not the same thing as the logarithmic integral. Hence, I was in error, and there is a closed form representation, and it is one that can be useful when using Mathematical or Matlab, since the polylog functions are readily available there.

Personally, I view the erf and logarithmic integral functions as not being closed form because they might typically be evaluated with numerical integration, rather than by a series formula. However, if a usable series representation can be shown for these integrals, I think it is proper to call it a closed form. This is just my opinion however, and I'm not sure what the mathematicians will say about it.

I'm curious to know the formal mathematical definition of "closed form". I think I'll do a search on it now.

EDIT: OK, so I did a search and this is what I found (see wiki link below). Personally, I find the distinction somewhat arbitrary. For example, sine and cosine are elementary enough to be classed as closed-form, but what about Bessel Functions? Those are not all that different? And, why not polylog functions?

Anyway, it's just semantics and does not really have too much impact on what we actually do. The term "analytical expression" or "analytical form" are more consistent with what many of use might consider to be a useful "closed form" solution.

https://en.wikipedia.org/wiki/Closed-form_expression
 
Last edited:
DerStorm8, steveB, The Electrician, MrAl thanks a lot for your consultations. I have tried integration by parts. My result is in attachment:
integration by parts.jpg
I have done integration in MathCad also. Result of MathCad's computation is not equal to integration by parts.
I have trouble in integration.
MathCad.JPG
What is mistake in the integration by parts (if MathCad's calculations is true) ?

P.S. This integral (which I asked in my first message of this topic) used in the calculation of crystal structure heat capacity (Debye model).
 
One issue I see, right away, is near the end where you say ...

[latex] \int \frac{(\ln y)^3}{y}dy=\frac{(\ln y)^4}{5}[/latex]

It should be the following ...

[latex] \int \frac{(\ln y)^3}{y}dy=\frac{(\ln y)^4}{4}[/latex]

Overall, when you get to the piece that says ...

[latex] \int \frac{\ln (y-1) (\ln (y))^2}{y}dy[/latex]

I think you are in need of something special, whether it be a special integral or special series form.
 
Last edited:
Does this mean that you don't consider results involving sine, cosine, tangent, exponential or log to be closed form, since they all involve infinite sums?

Hi there Electrician,


Well sin() and cos() and abs() are usually considered to be closed form, but infinite series are not usually referred to as closed forms. Anything that does not boil down to a finite number of operations is usually not considered closed form, especially since it's sometimes hard to determine if a simpler form exists.
For example, say i have the function:
y=a+fn1(x)
is that closed form if fn1(x) involves an infinite sum? If we call it closed, then what happens if later we find that the same expression is equal to:
y=a+b*x^3
So i makes sense that it is a closed form if it evaluates to a finite number of elementary functions but not closed otherwise.
Also keep in mind that we can call:
y=a*x
"not closed" if we consider making 'a' equal to infinity, so we can not be too persnickety here either :)

But one thing is for sure, and that is if the function evaluates to some infinite form then clearly it can not be closed by any definition can it? Case in point, we need to evaluate our solutions like i was saying in a previous post to make sure they are stable or else we can never call them closed form and i dont see any way someone could disagree with that. So with this in mind, did anyone check your function for convergence? If it doesnt converge for some a, b or in this case a,xm then we cant call it closed and maybe not even a solution. So that's the first thing to do, check it for convergence. I have a feeling there are going to be problems :)

Unfortunately i had a long day today and for the past few days, so im off, but i'd like to take a better look at this and see if we can find a neater solution. Also, im not entirely against a numerical solution here following a close examination of the function itself and comparing. I'd also be careful with a series which sometimes depend highly on the local region.

It would also help if we had a little more input, as to what the expected range for the constants will be, namely a and xm.
 
Last edited:
Overall, when you get to the piece that says ...

[latex] \int \frac{\ln (y-1) (\ln (y))^2}{y}dy[/latex]

I think you are in need of something special, whether it be a special integral or special series form.

The result from Mathematica for that integral once again involves the Lambert W (polylog) function:
 

Attachments

  • Integral2.png
    Integral2.png
    2.4 KB · Views: 302
In my view, what you showed is a valid closed form solution, albeit a complicated and somewhat obscure one for most of us engineers.

In my original comment, I was expressing the opinion that the form might be in terms of logarithmic integrals,

It's pointed out here:

https://mathworld.wolfram.com/Polylogarithm.html

that the Li notation for the logarithmic integral is similar to the Li[sub]n[/sub] notation for the Polylog, which I indeed confused.

which I believe would not represent a closed form solution (unless some kind of series form can be shown for those, as well). However, you have shown the answer in terms of the polylog functions, which is not the same thing as the logarithmic integral. Hence, I was in error, and there is a closed form representation, and it is one that can be useful when using Mathematical or Matlab, since the polylog functions are readily available there.

Personally, I view the erf and logarithmic integral functions as not being closed form because they might typically be evaluated with numerical integration, rather than by a series formula. However, if a usable series representation can be shown for these integrals, I think it is proper to call it a closed form. This is just my opinion however, and I'm not sure what the mathematicians will say about it.

See: https://mathworld.wolfram.com/Closed-FormSolution.html

As one would expect, it's just a matter of convention. I've seen a couple of articles by professional mathematicians proposing that the Lambert W function should be considered an elementary function. It is in fact very similar to the log and exp functions. Here's a good write-up: https://en.citizendium.org/wiki/Lambert_W_function.

In the old days, the sin, cos, tan, log, and exp functions were considered "elementary" functions even though the way one obtained their values was to look them up in a book of tables, and the values in that book were calculated by means of series expressions. Nowadays, since everyone gets the value of such functions with a computer program, even formerly complicated functions such as erf, elliptic integrals, Bessel functions, etc., are now easy to evaluate and use. I'm sure that in the future more and more functions that are available as pre-computed functions in modern mathematical software will come to be considered candidates for closed form integral solutions.

I'm curious to know the formal mathematical definition of "closed form". I think I'll do a search on it now.

EDIT: OK, so I did a search and this is what I found (see wiki link below). Personally, I find the distinction somewhat arbitrary. For example, sine and cosine are elementary enough to be classed as closed-form, but what about Bessel Functions? Those are not all that different? And, why not polylog functions?

Anyway, it's just semantics and does not really have too much impact on what we actually do. The term "analytical expression" or "analytical form" are more consistent with what many of use might consider to be a useful "closed form" solution.

https://en.wikipedia.org/wiki/Closed-form_expression
 
steveB, I continued integration to fix flaws:
infinite integration by parts.jpg
Result is not clear as yet.
MrAl, In the Debye model ɑ=h/kT. h-Planck's constant, k-Boltzmann constant.
The Electrician, thanks for your support. I will try consider Lambert W-function.
I propose to postpone the issue until the 2013.
Happy New Year, dear colleagues !)
 
steveB, I continued integration to fix flaws:
View attachment 69465
Result is not clear as yet.
MrAl, In the Debye model ɑ=h/kT. h-Planck's constant, k-Boltzmann constant.
The Electrician, thanks for your support. I will try consider Lambert W-function.
I propose to postpone the issue until the 2013.
Happy New Year, dear colleagues !)

Hello again,


Ok, but what i asked for was not what the variable was physically, i asked for what the range of the variables would be. So, what is the expected range of a and of xm?
For example:
0<a<2
0<xm<5
Telling me that 'a' is equal to other variables that include the Kelvin temperature doesnt help because i dont know what your expected temperature range is either, and i still dont know what your expected xm range is either.


For what it is worth, the solution to the integral from 0 to xm=+infinity is:
G(4)*Z(4)/a^4
where
G is the Gamma function and Z is the Zeta function.

If anyone posts a solution here test it for convergence with the desired a and xm range of values you need. Some of the solutions spit out by integration machines dont converge for many input parameters. Be especially careful with the so called Li(a,b) functions.

We can post better solutions once we know the range of 'a' and 'xm'.
 
Last edited:
steveB, I continued integration to fix flaws:
View attachment 69465
Result is not clear as yet.

You are making a good effort on this. It's not clear to me why you want to work this out yourself. Perhaps, just for the fun of it, or for learning. This is why my original advice was to use numerical integration. It seems to be one of those "time-sucking" problems that can detour you off your main problem. However, now you have the option to use the form with polylog functions, as provided by The Electrician, and I doubt there is any more convenient form than this.

Anyway, if you really want to work it out, you should use the series form of the polylog functions as the clue. The Electrician showed the result for that last problematic integral. That answer has a sum of many terms. A few of those terms are common log-type functions, while the remaining ones are those polylog funcitons. Hence, a few more steps of either substitution, or integration by parts may give you the easy terms and then leave you with some integrals that can only be solved in series form. Even better, by working backwards, you may be able to identify the details of a workable method. Remember, it is always easy to differentiate an anti-derivative and verify that it is correct. Once you do that, you have basically identified a way to go forward again. This is a method based on the idea that "hind-sight is 20/20". :D
 
For what it is worth, the solution to the integral from 0 to xm=+infinity is:
G(4)*Z(4)/a^4
where
G is the Gamma function and Z is the Zeta function.

The OP already gave this result (equivalently) in the first attachment to post #8


If anyone posts a solution here test it for convergence with the desired a and xm range of values you need. Some of the solutions spit out by integration machines dont converge for many input parameters. Be especially careful with the so called Li(a,b) functions.

The question of convergence is properly applied to infinite series. For a function which is not an infinite series, we ask whether the function is defined and correct for a particular argument.

For example, if the problem were to evaluate ∫cos(x)dx from 0 to Pi, and the closed form symbolic solution we used for the integral were sin(x), we wouldn't ask whether sin(x) converges; we ask whether it is defined over the range of integration.

The polylog functions used in the symbolic solution I gave in post #4 are defined and return a finite result for any finite real argument. That solution gives a finite, correct, result for any finite "a" and "Xm" greater than zero. The question of convergence is not applicable.

My example numerical integration gives the same result as the symbolic expression for a selection of values of "a", and for a range of "Xm" which I tested. I gave a plot showing the agreement for a particular case in my post.

I also gave a series approximation. Even though it is a series, since it's not an infinite series, the question of convergence is not applicable; the only question is how good is the approximation, and over what range of argument.
 
Georg,

If you intend to use the result of the integral in symbolic form to perform further symbolic calculations, the solution Mathematica gave involving polylogs probably won't be easy to work with. It does give correct numerical results, but you need to use it with some software package that has built-in polylogs for ease of use.

The polylog functions return a result with an imaginary part for real input arguments greater than 1. The fact that there are 3 polylogs in the given Mathematica expression allows the imaginary parts to cancel out, and return a pure real final result. See the attachment for the behavior of a couple of the polylog functions for real arguments ranging from -10 to +10, showing the real and imaginary parts of the returned value. You can see how an imaginary part appears at x=1.

If you just want numerical results, and don't have access to software that has polylogs built in, numerical integration would seem to be the way to go.
 

Attachments

  • Integral3.png
    Integral3.png
    15.9 KB · Views: 287
The OP already gave this result (equivalently) in the first attachment to post #8




The question of convergence is properly applied to infinite series. For a function which is not an infinite series, we ask whether the function is defined and correct for a particular argument.

For example, if the problem were to evaluate ∫cos(x)dx from 0 to Pi, and the closed form symbolic solution we used for the integral were sin(x), we wouldn't ask whether sin(x) converges; we ask whether it is defined over the range of integration.

The polylog functions used in the symbolic solution I gave in post #4 are defined and return a finite result for any finite real argument. That solution gives a finite, correct, result for any finite "a" and "Xm" greater than zero. The question of convergence is not applicable.

My example numerical integration gives the same result as the symbolic expression for a selection of values of "a", and for a range of "Xm" which I tested. I gave a plot showing the agreement for a particular case in my post.

I also gave a series approximation. Even though it is a series, since it's not an infinite series, the question of convergence is not applicable; the only question is how good is the approximation, and over what range of argument.

With regard to "G(4)*Z(4)/a^4"...

"The OP already gave this result (equivalently) in the first attachment to post #8"

The OP gave the numerical result of the constant part when integrating over 0 to +infinity, i have shown the way it is calculated:
G(4)*Z(4)/a^4

So what's your point?


Also, i am trying to establish the required range of parameters from the OP but he's not easily giving up that information :)
 
Last edited:
With regard to "G(4)*Z(4)/a^4"...

"The OP already gave this result (equivalently) in the first attachment to post #8"

The OP gave the numerical result of the constant part when integrating over 0 to +infinity, i have shown the way it is calculated:
G(4)*Z(4)/a^4

So what's your point?

It occurred to me that perhaps you hadn't noticed the result he gave. Your result is numeric, just as the OP's is. You've shown one way it may be calculated, not necessarily the only way, and you haven't shown how your result was obtained, which would be the interesting thing to post.

Also, i am trying to establish the required range of parameters from the OP but he's not easily giving up that information :)

In post #8, the OP showed an attempted calculation with "a"=1 and Xm=100; you could use that range. Or, you could assume your example range from post #14 and show how you would do it for that range.

The solution I derived with Mathematica works for 0<a<∞ and 0<Xm<∞, which should meet the OP's requirements.
 
Hello again,

Yes i'll have to post some more info on that.

Im not sure if the OP wants to use Mathematica though, and i have doubts if other software can handle the numerical results of all the Li(a,b) functions (a from say 1 to 10, b say 1 to 100). The series solution looks like it could be easily handled but we have to know the desired range of inputs, and i would not want to take 100 as the max unless he specified that, im sure you understand why. What i thought we could do was supply a ready made formula that could handle the required range and easily programmed into some simple environment.

But i also see that the OP is persistent in trying to solve this symbolically, which i think may not work too well without resorting to these other functions we've been talking about. I havent tried it myself, but if all the number crunchers are spitting out these special functions then i seriously doubt there is a better solution now, except in some special cases.

We still have some simpler methods left to explore this interesting shark fin curve, but they will most likely require using an approximation, and for that we really really need to know the expected range of parameters. It would also be nice to know the maximum acceptable error. I could show some work getting there, but it wont be cut and dry.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top