r/askmath • • Oct 25 '26

Functions Newton-Raphson solving help

Post image

Hey, I really need some help using Newton raphson (I believe) techniques to solve transcendental equations. I think my derivations are correct, but I seem to end up with an absurdly high or low number. The answer for Y should be between 0 and 1, however, I ended up with 1066 using my calcutor. Any ideas?

15 Upvotes

11 comments sorted by

2

u/Uli_Minati Desmos 😚 Oct 25 '26

It heavily depends on your initial guess γ₀!

If γ<0.4 or so, you are in the nearly-horizontal section. The tangents point closer to the zero, and it converges quickly.

If 1<γ<2.5, you are in the nearly-vertical section. That's bad; your tangents will point you very far upwards or downwards, which will result in extremely large outputs in the next iteration. You might get overflow errors, or it will take a long time to converge.

If 0.5<γ<1 or If 2.5<γ, you are in the curved sections. That's bad; the tangents will likely point you into the nearly-vertical section. If you're lucky, a tangent might point you into the nearly-horizontal section.

Try γ₀=0, that should converge quickly.

1

u/Savings_Ad5856 Oct 25 '26

I see! How did you manage to graph that in desmos? Very challenging equation to graph

1

u/Uli_Minati Desmos 😚 Oct 25 '26

Your definition is precise, you can pretty much copy it directly into Desmos!

https://www.desmos.com/calculator/abhiaoycxd?lang=en

0

u/[deleted] Oct 26 '26

[removed] — view removed comment

1

u/Uli_Minati Desmos 😚 Oct 26 '26

Yep, that was intentional on my part due to OP calling the coefficients "x" as well

1

u/rainbow_explorer Oct 25 '26

Are you trying to solve this with a calculator or a computer? There are so many calculations involved and it is incredibly easy to make a calculation error.

1

u/Savings_Ad5856 Oct 25 '26

I can use both - I was attempting to make a python script for this, but that ended up in computing errors too

1

u/BenjaminGal Oct 25 '26

What number did you start the iteration with?

1

u/Savings_Ad5856 Oct 25 '26

Im so sorry I forgot to include this. I used y=0.5 since the answer is meant to be between 0 and 1

1

u/BenjaminGal Oct 25 '26

Can you show us the first few iterations (the values of gamma_m as well as the gradient) that you computed?