Python Forum

Full Version: gaussian quadrature
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello every body

I tried writing gauss-legendre quadrature formula (Attached) in python , but i am still unsuccessful. Would you please help me?

Thanks

[Image: c24fcd80dc1e483ec6bd88564e53073147808e47.jpg]
Hi,

show the code you tried so far and it's more likely that you get help.

Regards, noisefloor
Thanks for your reply

but I don't have any idea about this code and I completely get confused.
Hi,

so "help me please" means basically, that you want somebody else to write the code for you...?

Anyway, did you ever try the search term "gauss-legendre quadrature python" at Google? This will give you some useful results on the first page of results.

Regards, noisefloor
https://stackoverflow.com/a/55674422/4620679

No idea if that's what you're looking for because I don't understand the concept/notation...
Btw I suggested edit to the answer I linked but before it gets accepted you'll have to add "import numpy as np" at the top of the code and change "areaGau = gaussian" into "areaGau = gauss".