MaplePrimes Questions

Dear Maple experts

I am using the following two implicitplot commands successfully for variables diffr1 and diffr2:

implicitplot(diffr1, 0. .. 1, 0. .. 1.0, filledregions = true, coloring = [cyan, yellow]);

implicitplot(diffr2, 0. .. 1, 0. .. 1.0, filledregions = true, coloring = [cyan, yellow]);

Now I want to have a plot that mixes them. For example, if diffr1>0 and diffr2>0 I get a color. if diffr1>0 and diffr2<0 I get another color, etc. Is there any way to do that? 

Could someone provide me with the references used when implementing the Statistics:-PredictiveLeastSquares function?

TIA

Hi,
Apparently I have a problem but I can't find it. Please advise what is the source of the error?
Please see the attached worksheet.
1.mw

I have a great deal of output from a procedure that I wrote clumsily.  How can I delete that output without highlighting and pressing the delete button.  Maple help is often of no help whatsoever.

What is the simplest way to direct all Maple output, and only Maple output, into a PDF?  

My preference would be to include a command at the beginning of a worksheet so that causes all output returned by Maple, print and graphics, to be directed to a named PDF.  Does such a command or set of commands exist, and if so, what is the process to get it to work?

An alternative is to have a command at the end of a worksheet that causes Maple to print the worksheet to a PDF.  Does that exist, and if so, what is it?

For example: n=78 (is squarefree because 2 x 3 x 13)

Possible periodlenghts in different bases for 1/78  are  {2,3,4,6,12} this is calculated with Multiplicative-Order (Maple).

Now we pick a period from above, for example 6.

The question is:

Which possible bases exist for 1/78 with  periodlenght of 6 ?

The result is: possible bases calculated with Multiplicative-Order
are {17,23,29,35,43,49}.

Question:
Is there a formular to calculate the bases directly or with less calculations than the Maple-Command ?

Thanks for helping :)

hi i am trying to create a procedure for newton rhapson method, which finds roots of a function. the first procedure i made work but now i want it to show an error message for when the function diverges at x0 and when the derivative at x0 = 0. can someone pls advise me how to fix it? thank you:)

NM1 := proc(f, xold)
    local x1, x0, precision;
    x0 := xold;
    x1 := evalf(x0 - f(x0)/D(f)(x0));
    precision := 10^(-3);
        if limit(f,(x0)) = 0 then
            error("Newton's Method cannot do the calculation");
        end if;
        if D(f)(x0) = 0 then
            error("Newton's Method cannot do the calculation");
        else
        while abs(x1-x0) > precision do
            x0 := x1;
            print(x0);        
            x1 := evalf(x0 - f(x0)/D(f)(x0));            
        end do;
        end if;

   return x1;
end proc:

Dear users! 

I hope everyone is fine here. I have the following expression:

r*y[0, 1]+y[0, 0]+(1/6)*r*(r-1)*(1+r)*y[-1, 3]+(1/2)*r*(r-1)*y[-1, 2]+(1/120)*r*(r-1)*(r-2)*(1+r)*(2+r)*y[-2, 5]+(1/24)*r*(r-1)*(r-2)*(1+r)*y[-2, 4]+(1/720)*r*(r-1)*(r-2)*(r-3)*(r-4)*(1+r)*y[-3, 8]+(1/360)*r*(r-1)^2*(r-2)*(r-3)*(1+r)*y[-3, 7]+(1/720)*r*(r-1)*(r-2)*(r-3)*(1+r)*(2+r)*y[-3, 6]:

What is the procedure to select some terms in the above expression for example for N=2 I just want the following terms:

y[0, 0]+r*y[0, 1]+(1/2)*r*(r-1)*y[-1, 2];

and for N=3 I just want the following terms:

y[0, 0]+r*y[0, 1]+(1/2)*r*(r-1)*y[-1, 2]+(1/6)*r*(r-1)*(1+r)*y[-1, 3];

and for N=4 I want:

(1/24)*r*(r-1)*(r-2)*(1+r)*y[-2, 4]+y[0, 0]+r*y[0, 1]+(1/2)*r*(r-1)*y[-1, 2]+(1/6)*r*(r-1)*(1+r)*y[-1, 3];

and so on,

in the descending order in first suffices and ascending order in second suffices (like term having y[0,0],  y[0,1], y[-1,2], y[-1,3], y[-2,4]). I am waiting for your response. Thanks.

 

1) the two cylinders are centered on the x and z axis respectively

2) any two intersecting cylinders

Hi everyone,
Please I need your help, if anyone has idea of using Perturbation Theory to Solve the following Logistic Fractional Equation and ploting with iteration. Thanks

Restart

u(t):=1/(m)(u(t)-(u^(2)(t))/(k));

NULL

uu(t):=(k*u_0)/((u_0+(u_0)*k)*(e)^(-t/(m)))

NULL

u(0) = u_0

NULL

Hi,

I want to define the functions 10 and 11 and then put them in the eq equation, then simplify them and get the unknown values after the solve command, but there are error.

And value the function psi ?

NULL

NULL

restart

with(student)

NULL

"U(xi[n]):=a[0]+sum(-a[i]*psi^(i)(xi[n]),i=1..1)+sum(-b[i]*psi^(-i)(xi[n]),i=1..1)+sum(-c[i]*((diff(psi,xi[n])^(i)))/(psi^(i)(xi[n])),i=1..1);"

Error, empty script base

Typesetting:-mambiguous(Typesetting:-mrow(Typesetting:-mi("U", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("&xi;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", font_style_name = "2D Input", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("&Assign;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mn("0", mathvariant = "normal"), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mo("&plus;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("sum", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("a", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mo("&sdot;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&psi;", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("&xi;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("&comma;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo("&period;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mo("&period;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("&plus;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("sum", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("b", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal"), Typesetting:-mo("&sdot;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-msup(Typesetting:-mi("&psi;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic")), superscriptshift = "0"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("&xi;", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("&comma;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo("&period;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mo("&period;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo("&plus;", accent = "false", fence = "false", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("sum", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mo("&uminus0;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.2222222em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mi("c", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mo("&sdot;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mfrac(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("diff", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("&psi;", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mo("&comma;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("&xi;", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", font_style_name = "2D Input", mathvariant = "normal")), font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mambiguous(Typesetting:-msup(Typesetting:-merror("?"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-merror("empty script base"))), font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi("&psi;", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), superscriptshift = "0"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("&xi;", font_style_name = "2D Input", fontstyle = "normal", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mi("n", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), open = "&lsqb;", close = "&rsqb;", font_style_name = "2D Input", mathvariant = "normal")), font_style_name = "2D Input", mathvariant = "normal")), bevelled = "false", denomalign = "center", linethickness = "1", numalign = "center"), Typesetting:-mo("&comma;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.3333333em", separator = "true", stretchy = "false", symmetric = "false"), Typesetting:-mi("i", font_style_name = "2D Input", fontstyle = "italic", mathvariant = "italic"), Typesetting:-mo("&equals;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2777778em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mo("&period;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mo("&period;", accent = "false", fence = "false", font_style_name = "2D Input", largeop = "false", lspace = "0.2222222em", mathvariant = "normal", movablelimits = "false", rspace = "0.0em", separator = "false", stretchy = "false", symmetric = "false"), Typesetting:-mn("1", font_style_name = "2D Input", mathvariant = "normal")), font_style_name = "2D Input", mathvariant = "normal"), Typesetting:-mo("&semi;", accent = "false", fence = "false", largeop = "false", lspace = "0.0em", mathvariant = "normal", movablelimits = "false", rspace = "0.2777778em", separator = "true", stretchy = "false", symmetric = "false")))

 

NULL

U(xi[n+1]) := U(xi[n]+d)

U(xi[n]+d)

(1)

U(xi[n-1]) := U(xi[n]-d)

U(xi[n]-d)

(2)

NULL

eq := c*(diff(U, xi[n]))*(U(xi[n])+u(xi[n-1]))*(U(xi[n])+u(xi[n+1]))-(2*(u(xi[n-1])-u(xi[n+1])))*(U(xi[n])^2)(1-U(xi[n])^2)

-2*(u(xi[n-1])-u(xi[n+1]))*(U(xi[n]))(1-U(xi[n])^2)^2

(3)

NULL

Download abs.mw

What am I doing wrong, why cant I get the result correct?

 

 

proc(U::Matrix);

proc (U::(Matrix(i .. m, j .. m))) local m, i, j; m := LinearAlgebra:-Dimension(U); if modp(i+j, 2) = 0 then U[i, j] := 1 else U[i, j] := 0 end if end proc

``

(1)

Hello! I've made these procedures but it doesn't result give me the result i want. Can someone please tell me where it is I made a mistake?

 

Hello

I have programs below for the cases n=3 and n=4. If n is increasing by 1, then there is one loop more. As you can see, that additional loop has always the structure:

x[i+1] from ceil(((n-2)*24-d[i])/(n-i)) to x[i]

whereas d[i] is the sum of the values of x before.

Now I want to write "nequaln":=proc(k), which goes through all the values for n from 3 to k and produces a list [a_3,a_4,a_5,...,a_n].

I guess that I need to program a kind of dynamical loop, but I failed completely. May someone help me? That would be very kind.

 

nequal3:=proc()
    local u,v,a_3;
    a_3:=0;
    for u from ceil((3-2)*24/(3-0)) to (3-2)*24-3+1 do
        for v from ceil(((3-2)*24-u)/(3-1)) to u do
            if (3-2)*24-u-v>=1 then
                a_3:=a_3+1;
            end if;
        end do;
    end do;
    print(a_3);
end proc:

 

nequal4:=proc()
    local u,v,w,a_4;
    a_4:=0;
    for u from ceil((4-2)*24/(4-0)) to (4-2)*24-4+1 do
        for v from ceil(((4-2)*24-u)/(4-1)) to u do
            for w from ceil(((4-2)*24-u-v)/(4-2)) to v do
                if (4-2)*24-u-v-w>=1 then
                    a_4:=a_4+1;
                end if;
            end do;
        end do;
    end do;
    print(a_4);
end proc:

First 60 61 62 63 64 65 66 Last Page 62 of 2308