how to take numerical inverse integration?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Somnath Kale
el 26 de Jun. de 2022
Editada: John D'Errico
el 26 de Jun. de 2022
Hi
I was trugulling to find the value of S(q) (see the attached equation)
In attached data I have B(r), r and q values. can someone please help me in that contex?
Thanks in advance!
2 comentarios
Abolfazl Chaman Motlagh
el 26 de Jun. de 2022
there is integration over q, so it's a dummy variable. why do you have a value for q in every row?? you should have a list of data for r and B(r). if i'm wrong about something correct me.
with some observation over r we have set of equations for B(r) and the integral. then we can approximate S(q) with finite difference method.
Respuesta aceptada
John D'Errico
el 26 de Jun. de 2022
Editada: John D'Errico
el 26 de Jun. de 2022
This is technically called an inhomogeneous Fredholm integral equation, of the first kind.
Inhomogeneous, because that left hand side has g in it, not zero.
Is it easy to solve? Is there some one line call to do it, one simple piece of code you can find? Sadly, no. These tend to be difficult problems, that are, as I recall, numerically problematic. They are often things that will highly amplify any small amount of noise in your data. The technical term there would be ill-posed. It means that while the solution is not impossible, it is just ... difficult to do well.
I did a quick search for code to solve a general first kind integral equation, but,, although I did see some cases where someone claimed to solve integral equations using MATLAB, I did not find anything you could use.
Worse, then I took a quick look at your data. UGH. Why do I say that? UGH squared.
Look at the values q and r take on. They are seriously large numbers. Then, inside the integral, you have cos(q*r). That means you have this cosine wave inside the integral that is oscillating insanely fast. In turn, that means that your solution will be virtually impossible.
Again, go back to the ill-posed thing. Inside your integral, you have this thing that is oscillating over millions of cycles. Lets see, if we have
a = 341E-9;
L = 5.53e-7;
Then the limits of your integration are
[2*pi/L,2*pi/a]
And r varies from effectively close to zero 3.41796875 to 553.7109375. So r varies by over a factor of 100. What does q*r look like then? q*r is a product that can be as small as
3.41796875*1.1362e7
to
553.7109375*1.8426e7
As I said, you have this cosine function that is varying by millions and even billions of times inside the domain of integration. In turn that means s(q) must be a function that also varies extremely rapidly. (Simple finite differences are probably a REALLY INSANELY BAD IDEA, when something varies that rapidly.) More typically, one uses some sort of regularized spline to estimate as s(q). The regularization counteracts the ill-posed nature of the problem, making it more tractable.
And you want to solve this, using only a few hundred pieces of data? As a consulting mathematician, I would tell you to walk as fast away from that problem as fast as you can. In fact, run like hell! At the very least, I would suggest you do a LOT of reading. Learn how such fitst kind integral equations are typically solved. Spend some time talking with a mathematician, one who understands these ugly animals, and who understands the numerical methods necessary to solve them.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!