Items tagged with method method Tagged Items Feed

and plot  function I? This I is the area which I wrote at the paper.

Could you give me the code which can be used to solve the ODE by numerical method and plot I with respect to t?

I think I have write down everything clearly but if you feel confused please ask me.

I am eager to know the code. Thanks very much!

Dear all,

I need you help to finish some steps of this idea to approximate the roots of a given equation (polynom). Thanks in advance for your help. 

I have a sturm sequence, I would like to use Bisection method to approximation the roots using Sturm decomposition of my polynom. For example, my polynom is  P=x^6-4*x^3+x-2

s := sturmseq(x^6-4*x^3+x-2,x);

sturm(s,x,-2,2); # The number of roots in the interval (-2,2)

Here, i would like to find the roots in (-M,M) :

Bounding all roots in [-M,M] where M = max{1, sum^(n-1) |ai|/an}.

f0 = f, f1 = f', then use -remainder,

I know that  sturm(s,x,-M,M); gives the number of roots in (-M,M)  but is it possible to use the variation of sign like :

      gives a Sturm sequence for f.

      variation of sign, varsign(a0,a1,...,ar).

      Thm: (Sturm) varsign(f0(alpha),...,fr(alpha)) - varsign(f0(beta),..., fr(beta))

      is the number of distinct roots of f in [alpha,beta].

then i would like Isolating roots of rational polynomials


Method: reduce, remove rational roots, divide and conquer in [-M,M],

      then use bisection  in disjoint closed intervals ctg one root each

 Bisection method :

      Setup: f(a) < 0, f(b) > 0 (or conversely).
      Repeated subdivision of [a,b] guaranteed to get close to a root.

      Error analysis: for error eps, solve (b-a)/ 2^(n+1)  < tol for n. where tol is the tolerance


Dear all;

I need you help for solving this problem, and thanks in advantage for your help.

I have a polynom like  P =x^6-4*x^3+x-2;  and i would like to find an approximate value of the roots in some interval [a,b] =[-2,2] using sturm sequence.

The method is based on:

1) first construct the sturm sequence:

For given polynom P =x^6-4*x^3+x-2;

Let S0=P;


let   s:=quo(S0,S1,x);

.... S[k+1-rem(S[k-1],S[k]);


S[k] is the sturm sequence.

2) let f(a)= number of change of sign in the sturm sequence and f(b) the same . so f(b)-f(a) give the number of roots in the interval [a,b].

3) If f(b)-f(a) =0 so there are no roots

and if f(a)-f(b)=1 one can find the root

4) if f(a) -f(b) >2  :

given toterance tol=0.001; for example

if the abs(a-b)<2*epsilon we display a message that there are k roots at (b+a)/2

with our error tolerance

5) otherwise if c=(b+a)/2 is not a root of P_k(x)  for any k, ( where p_k is an element of the sturm sequence ) 

we divide the interval into equal halves [a,c] and [x,b] and we run step 2 on each interval

else if c is a root of one of these p_k(x) add any time account to c so that c lies close the middle of [a,b] and not a root

6) Give all the roots ( approximate the rrots with small error epsilon).


I kindly  appreciate your help




Completely new to maple. Not even sure where to start with this. Can't get the Simpson's or Trapezoidal Rule to work for me. Any help would be much appreciated

Hi everyone. Can enuone help with small parameter method?


eq := diff(x(t), `$`(t, 2))-epsilon(alpha*x(t)^4-beta)*(diff(x(t), t))-x(t)+x(t)^3;

subs(x(t) = 1+epsilon*x[1](t)+epsilon^2*x[2](t), eq);

pls help with this...

Hello. I have an inequality and I need to prove or negate if it is true or false. This inequality has 8 variables. I simplify it and try to see if it is ture or false. I tried "test relation" in maple and it seems I can't say it is always true or false. For some values of the variables it is true and for some others its false. Is there a method I can show if this inequlity is hold under some assumptions? I mean I want to keep some variables as constant and prove it up to a point. My inequlity is below. Thank you for the help in advance.

(P[A]*(p-w)/(1-P[A])-c)*H[A]+(w-P[A]*(p-w)/(1-P[A]))*P[A]*H[A]+w[u]*P[B]*(1-P[A])*H[B] < (P[B]*(p-w)/(1-P[B])-c)*H[B]+(w-P[B]*(p-w)/(1-P[B]))*P[B]*H[B]+w[u]*P[A]*(1-P[B])*H[B]

And this is how it looks on maple:

Hi, I am completely new to Maple, and I need to use it to optimize my equations in order to make my PLC codes more compressed. I am calculating forward kinematics with the Denavit-Hartenberg method and as such I get long expressions. After a lot of google'ing and frustration, I thought I'd ask here in the hope that one of you might be able to assist me.

I have the following equations;

X := L10*cos(q5) - L16*(sin(q10)*(sin(q5)*sin(q8) - cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) - cos(q10)*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)))) - d2*(cos(q10)*(sin(q5)*sin(q8) - cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + sin(q10)*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)))) + L15*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6))) - L11*cos(q5)*sin(q6) + d1*cos(q5)*cos(q6) - L13*sin(q5)*sin(q8) + L14*cos(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + L13*cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7)) - L14*sin(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)) + L12*cos(q5)*cos(q6)*cos(q7) - L12*cos(q5)*sin(q6)*sin(q7);

Y := L10*sin(q5) - L9 + L16*(sin(q10)*(cos(q5)*sin(q8) - cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q10)*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)))) + d2*(cos(q10)*(cos(q5)*sin(q8) - cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) + sin(q10)*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)))) - L15*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6))) + L13*cos(q5)*sin(q8) - L11*sin(q5)*sin(q6) + d1*cos(q6)*sin(q5) - L14*cos(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - L13*cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5)) - L14*sin(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)) + L12*cos(q6)*cos(q7)*sin(q5) - L12*sin(q5)*sin(q6)*sin(q7);

Z := L15*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - L11*cos(q6) - L8 - d1*sin(q6) + L16*(cos(q10)*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - cos(q8)*sin(q10)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - d2*(sin(q10)*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) + cos(q8)*cos(q10)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - L13*cos(q8)*(cos(q6)*sin(q7) + cos(q7)*sin(q6)) - L14*sin(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - L12*cos(q6)*sin(q7) - L12*cos(q7)*sin(q6) - L14*cos(q9)*sin(q8)*(cos(q6)*sin(q7) + cos(q7)*sin(q6));


I need to optimize these equations, but still keep them separate. I would like to use mutual expressions for the calculations within, but still as I said keep the outputs of X, Y and Z separate.

This is MATLAB code.


Thanks in advance for any help.

I'm trying to solve a system of four pdes and I know that the Newton method won't converge.

Are there other numerical methods that I can use?

Any help would be greatly appreciated!



hai everyone. i am currently trying to solve an integration of the following ∫g(η)dη . integrate from 0 to 10.

from the following odes.

f ''' +1-(f ')2 +ff ''=0,


with boundary conditions f(0)=0, f'(0)=λ, f'(∞)=1, g(0)=1,g(∞)=0

First, i solve the odes using the shooting method. then i used the trapezoidal rule to solve for the integration of g(eta) using the following codes

> with(student);
> trapezoid(g(eta), eta = 0 .. 10, 10);
> evalf(%);

it seems that it can not read the data from the shooting method. can anyone suggest why it is happening?

thank you verymuch for your concern :)



i solved my equation as follow , i want to know a compelet describtion that which method of pde/numeric methods is using .







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.


 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):
 for i from 2 to N do
 end do:
 So,my system:



I want to ask advice on how to solve the system.
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

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

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



Thank you very much for your idea in previous discussion: this is the link.

I asked how can I plot the phase portrait of this system

Sys1 := {diff(r(t),t) = r(t)^2*sin(theta(t)), diff(theta(t),t) = -r(t)^2*(-2*cos(theta(t))^2+1)};

I get this answer:


1) For me it's not necessary to give an initial condition to plot the pharse portrait.

2) What is the line in this phase portrait.

3) Here, I try a second method using Matlab code, I get:


and this is the code:

[r, theta] = meshgrid(0:pi/4:2*pi, 0:pi/4:2*pi);
rdot =r.^2.*sin(theta) ;
thetadot = r.^2.*(1-2*sin(theta).^2);

the arrow in the phase portrait are not the same.

Can someone give me more clear information about this problem.

Many thinks.


I am a problem with solve differential equation, please help me: THANKS 

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);

dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, numeric, output = array([0.]));

              Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead

****************FORMAT TWO ********************************************************

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);
dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, method = bvp[midrich], output = array([0.]));
                                   Error, (in dsolve) too many levels of recursion





Hi every body:

how can i solve this equations(without numerical method):

eq1 := (D[1, 1](eta11))(t, a*t, a^2*t)+1.326096634*10^8*Pi^2*eta11(t, a*t, a^2*t)-3.315241586*10^7*Pi*eta21(t, a*t, a^2*t) = 0

eq2 := 2.054901810*10^13*eta21(t, a*t, a^2*t)+(D[1, 1](eta21))(t, a*t, a^2*t)-8.219607239*10^13*Pi*eta11(t, a*t, a^2*t)+4.137421500*10^8*Pi^2*eta21(t, a*t, a^2*t) = 0

eq3 := (D[1, 1](eta31))(t, a*t, a^2*t)+4.137421500*10^8*Pi^2*eta31(t, a*t, a^2*t) = 0

Dear all,

I would like to solve the Fredholm Integral equation, using numerical method.
This is my code.

there is a problem with subs, does not working here.
# Then, we obtain from (9) the coeficient A[n] and B[n].

Then I woulk like to recompute (2), and then compute (1).
# Puting x=m*h, in (1), how can we generate a linear Matrix from (1).


1 2 3 4 Page 1 of 4