## Evaluating a list of equations...

Greetings,

i have a problem working with a list of equations. The background for the whole thing is simulating the movement of 4 astronomical bodies with Newtons equation. Currently i have a list which looks like this (read x(1,1) as x-coordinate body 1 time =1):

[ x(1,1)=1,12312,y(1,1)=2,3123,z(1,1)=4,141,...,x(1,n)=5,0102,y(1,n)=0,912,z(1,n)=8,1232,...,x(4,n)=5,92y(4,n)=1,656,z(4,n)=3,141]

so i basically have all the information about where the bodies are.

I want to use this information to create a 3D-pointplot. I know that the point plot requires a special input form ( {[x(1,1),y(1,1),z(1,1],[x(1,2),y(1,2),z(1,2)].....} ), but i alread have managed to convert my original list accordingly. However, i cannot use this new list for pointplot because it contains equations and not simple values.

So how do i get from a list as shown above to a list which contains merely the numeric values?

## Trying to use Newton's Method within a tolerance, ...

Basically what I'm trying to do is use Newton's method to find the root of f(x)=sqrt(x)+ln(0.1x) starting at x0=5 within a tolerance of 0.001.

f := proc (x) options operator, arrow; sqrt(x)+ln(.1*x) end proc

> xk := 1.0;
print(`output redirected...`); # input placeholder
1.0
> for k to 6 do xk1 := xk-f(xk)/(D(f))(xk); xk := xk1 end do;

When I do that, Maple barfs out pages of nonsense when I'm looking for it to give numerical values. It seemed to work fine with a different function, so maybe that's part of the problem? But I need to do it with the function I asked about.

## convergence of newton method...

how i can find order of convergence of newton method by expanding taylor series?? plz send me code???

## Newton iteration is not converging...

Dear All,

I am going to solve the following systems of ODEs but get the error: Newton iteration is not converging.
Could you please share your idea with me. In the case of AA=-0.2,0,0.2,0.4,...; I could get the solution.

restart;
with(plots);
Pr := 2; Le := 2; nn := 2; Nb := .1; Nt := .1; QQ := .1; SS := .1; BB := .1; CC := .1; Ec := .1; MM := .2;AA:=-0.4;

Eq1 := diff(f(eta), `\$`(eta, 3))+f(eta).(diff(f(eta), `\$`(eta, 2)))-2.*nn/(nn+1).((diff(f(eta), eta))^2)-MM.(diff(f(eta), eta)) = 0; Eq2 := 1/Pr.(diff(theta(eta), `\$`(eta, 2)))+f(eta).(diff(theta(eta), eta))-4.*nn/(nn+1).(diff(f(eta), eta)).theta(eta)+Nb.(diff(theta(eta), eta)).(diff(h(eta), eta))+Nt.((diff(theta(eta), eta))^2)+Ec.((diff(f(eta), `\$`(eta, 2)))^2)-QQ.theta(eta) = 0;
Eq3 := diff(h(eta), `\$`(eta, 2))+Le.f(eta).(diff(h(eta), eta))+Nt/Nb.(diff(theta(eta), `\$`(eta, 2))) = 0;

bcs := f(0) = SS, (D(f))(0) = 1+AA.((D@@2)(f))(0), theta(0) = 1+BB.(D(theta))(0), phi(0) = 1+CC.(D(phi))(0), (D(f))(etainf) = 0, theta(etainf) = 0, phi(etainf) = 0

Error, (in dsolve/numeric/ComputeSolution) Newton iteration is not converging

## Convergence of Newton method...

let γ be the root

i have to apply taylor series on f(x) and then do some substitution like (helped by a member of Mapleprime)

restart;
taylor(f(x), x = gamma, 8);
f(x[n]) := subs([x-gamma = e[n], f(gamma) = 0, seq(((D@@k)(f))(gamma) = factorial(k)*c[k]*(D(f))(gamma), k = 1 .. 1000)], %)

then find the derivative of result from above output

i do

b := diff((x[n]), e[n])

basically i have to find the value of newton method which is

yn=xn-f(xn)/D(f)(xn)

here we substitute xn=γ and D(f)(xn)=b

and then want to apply f on yn

there are to problem which i face

1  f(xn)/D(f)(xn) is not in simplified form i-e O(e[n]^8) and O(e[n]^7) is appeared in numerator and denominator respectively. how we get the simplified result.

2 wht step should i do to find f(yn)

plx help me to do this

## methods for solving systems of nonlinear equations...

Hi all!

I do a small calculation and get a system of 6
nonlinear equations.
And "n" is the degree of the equation is float.

Here are the calculations that lead to the system.

restart;
with(DirectSearch):
B:=1:
q:=1:
l:=1:
n:=4.7:
V:=0.05:
N:=1200:

kappa:=Vector(N+1,[]):
theta:=Vector(N+1,[]):
u:=Vector(N,[]):
M:=Vector(N,[]):
Z:=Vector(N,[]):

M_F:=q*(6*l*(z-l)-z^2/2):
M_1:=piecewise((z<l), l-z, 0):
M_2:=piecewise((z<2*l), 2*l-z, 0):
M_3:=piecewise((z<3*l), 3*l-z, 0):
M_4:=piecewise((z<4*l), 4*l-z, 0):
M_5:=piecewise((z<5*l), 5*l-z, 0):
M_6:=6*l-z:
M_finish:=(X_1,X_2,X_3,X_4,X_5,X_6,z)->M_1*X_1+M_2*X_2+M_3*X_3+M_4*X_4+M_5*X_5+M_6*X_6+M_F:

kappa_old:=0:
theta_old:=0:
u_old:=0:
M_old:=0:

step:=6*l/N:
u[1]:=0:
kappa[1]:=0:
theta[1]:=0:

for i from 2 to N do

z:=i*step:
kappa_new:=kappa_old+B/V*(M_finish(X_1,X_2,X_3,X_4,X_5,X_6,z))^n*step:

theta_new:=theta_old+1/2*(kappa_old+kappa_new)*step:

u_new:=u_old+1/2*(theta_old+theta_new)*step:

Z[i]:=z:
kappa[i]:=kappa_new:
theta[i]:=theta_new:
u[i]:=u_new:
kappa_old:=kappa_new:
theta_old:=theta_new:
u_old:=u_new:

end do:

So,my system:

u[N/6]=0;
u[N/3]=0;
u[N/2]=0;
u[2*N/3]=0;
u[5*N/6]=0;
u[N]=0;

I wanted to use Newton's method, but I don't know the initial values X_1..X_6.

Tried to set the values X_1..X_6 and to minimize the functional
Fl:=(X_1,X_2,X_3,X_4,X_5,X_6)->(u[N/6])^2+(u[N/3])^2+(u[N/2])^2+(u[2*N/3])^2+(u[5*N/6])^2+(u[N])^2:

with the help with(DirectSearch):
GlobalOptima(Fl);
But I don't know what to do next

Please, advise me how to solve the system! I would be grateful for examples!

## Plotting Newton's Method In Maple...

Hi, I am using Maple 18 and struggling with plotting Newton's Method.

I am wanting use the function f(x)=x^3 +cx + 1 where c is a parameter and uses 100 parameter values between -2 and 0, with 100 iterations of each parameter.

Any help would be brilliant.

Neil

## Newtons Method in an Interval...

Hello, I'd like to use Maple to use Newton's Method in an interval to find multiple roots of 4xcos(3x)+(x-2)^2-2=0. What I have so far is:

with(Student[NumericalAnalysis]):
f := 4*x*cos(3*x)+(x-2)^2-2:
Newton(f,x=2,tolerance=10^(-4));

Other than trying out different initial guesses is there a way to do this?

## Help with an error in procNewton...

Hello,

Can anyone help me with this error in Maple while using prcNewton to find local extrema:

` `
`> prcNewton := proc () `
`local ftn, strpt, epsilon, maxlps, i, xn, dftn; `
`if 4 < nargs then `
`elif nargs < 2 then end if; `
`if nargs = 2 then `
`epsilon := 1/10000000; `
`maxlps := 1000 `
`elif nargs = 3 then `

## Use Newton's Method to Find Local Extrema...

Use Newton's Method to find a local extrema for f(x)=sin(x^2)+x

with start point x=(1,0)

take derivative of f(x) then apply Newton's Method

My teacher started us off with this but I can't seem to get it to work the way she did, any help would be appreciated!

prcNewton:=proc( )

local ftn,strpt,epsilon,maxlps,i,xn,dftn;

if nargs>4 then

## Help with Solving this,...

Use Newton’s Method to approximate the indicated root of the equation to correct six decimal places.

The root of 2.2x5 – 4.4x3 + 1.3x2-0.9x-4.0=0 in the interval [-2, -1].

The rest of the assignment states : "

`Start by plotting the function inMaple to get a reasonably good initial approximation. You may use a“while” loop, but do not use existing Maple commands for Newton’s`
 Page 1 of 1
﻿