Group Abstract Group Abstract

Message Boards Message Boards

0
|
9K Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Loop with definite scope of alpha until the result no longer change?

Posted 9 years ago
POSTED BY: Reni Todorova
5 Replies

You may try this:

f[x_] := Log[x] + x - 0.5
y[x_] := x - \[Alpha] f[x]/f'[x]

Table[FixedPointList[# + (4 (y[#] - #) f[#])/(3 f[#] - 2 f[y[#]]) &, 0.75],{\[Alpha], 0, 1, 0.01}]
Posted 9 years ago

That is what i need. Thank you a lot. Can you tell me how to display the current value of alpha and the relevant result.

POSTED BY: Reni Todorova

Sure, you can apply FixedPoint[] as well as FixedPointList[]:

f[x_] := Log[x] + x - 0.5
y[x_] := x - \[Alpha] f[x]/f'[x]

Table[Print["\[Alpha] = ", \[Alpha], " ", 
  FixedPoint[# + (4 (y[#] - #) f[#])/(3 f[#] - 2 f[y[#]]) &, 
   0.75]], {\[Alpha], 0, 1, 0.01}]
Posted 9 years ago

Thank you very much! You save me. Have a nice day :)

POSTED BY: Reni Todorova

Please make sure you know how to format code properly: https://wolfr.am/READ-1ST

I have tried with while, do and fixed point, but I did not get the right result.

Please edit your post and add code you have tried as you mention above.

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard