New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of Exercise_08_c #1
Comments
I think |
How? |
Sorry, I should have explained that a bit more.
therefore
we can choose any Questions asks for x=3, for which Possible pseudo-code for program:
Can try different values of Hope that helps a bit more. edit: this repository is a really nice collection of Fortran snippets - great work! |
Thank you very much @LKedward |
Can you provide a reference to a derivation for the relationship you show in the original post? A quick glance suggests the series is divergent for z <= 0, so a numerical approach is unclear for -1 <= z <= 0. When z > 0, xi < 1, so one can compute the series numerically to determine lnx. |
@FortranFan, the exercises appear to be from: Bose, S., 2019. Numerical Methods Of Mathematics Implemented In Fortran. Singapore. Springer. See here on google. The text does not provide a derivation for the relation; my summary conclusion is that it is an error since |
One derivation of the relation in the original post follows from the identities
From this, it follows that ln(z) = ln(1-y) - ln(1+y) Taylor expansion at y=0 on the right then gives the result shown in the original post where all of the even terms vanish. The radius of convergence of ln() on the right is -1<y<1. However, convergence is slow for large |y|, so the only useful values for computation are when y is small, which is when z is near +1. Thus in the computation where x is given, m should be chosen to make z<=1 as close to 1 as possible. |
The text was updated successfully, but these errors were encountered: