0 Reputation

2 Badges

6 years, 213 days

MaplePrimes Activity

These are questions asked by twotone

Useing the following procedure I'd like to collect a set of  roots in a list of lists, so they can be manipulated and presented in various plot options. Some of which could be very interesting (to me only perhaps).

One option is to create a loop which produces values of newton roots x0 for a given function. For example:              f:=x->(x^7)-5

for x from -1 to 1 by 0.05 do

This thread stimulated me into playing with a few ideas,

I pieced together this little newton-raphson procedure...

> newton := proc( f, # the function x0 # the initial guess n, # step count limit tol # error tolerance)

local x, g, k;

g := D(f); # the derivative f’(x)

x[0] := evalf(x0); # initialize the iteration

for k from 1 to n do # loop for newton’s iteration

# Newton’s iteration formula

To highlight the problem I am haveing let us observe the following example. If we solve the following numerically,

d2/dx2 (s(x)) +s(x) -1=0,

ic: s(0)=1/2,s'(0)=0

How would I go about createing a plot of (s(x),x) for  x a member of [0,2*Pi) (useing polar coordinates clearly)?

The probelm I am haveing is plotting for x a member of [0,2*Pi). I know how to do this for x a member of [0,2*Pi] and (0,2*PI), but not  [0,2*Pi).

Page 1 of 1