MaplePrimes Questions

Hi, my question is concerning a "summand counting function" i require ie suppose for the following input

of [a+b+c,a+b,a+b+c+d,a] mapping this function will produce the output [3,2,4,1]

Hi Maple Users

I am trying to use GRADIENT (with(codegen)) with a proc that includes hypergeom function but it produces the following error:

Error, (in GRAD/givedname) incorrect syntax in parse: unexpected end of input (near 4th character of parsed string)

When I remove the bits including hepergeom function it works so there seems to be some parsing problem with hypergeom. The proc is below ( I have simplified the code by assignig values to some variables). Any help is appreciated.

OV := proc(d1, d2, o)
    local noc, lambda1, lambda2, nu1, nu2, z1, z2, a1, a2, p1, p2, x1, x2, Be1, Be2, q1, q2, w1, w2, aprime, zprime, nx, nBe;
    local hg1, hg2, hg3, hg4;
       
    lambda1 := 5.22;
    lambda2 := 2.36;
    nu1 := 12.96;
    nu2 := 4.23;
    z1 := 4.99;
    z2 := 1.43;
    
    a1 := lambda1 * nu1;
    a2 := lambda2 * nu2;
    
    p1 := 1;
    p2 := 1;


    x1 := exp(a1/z1 + lnGAMMA(d1/z1 + 1) - d1/z1 * ln(a1/z1));
    x2 := exp(a2/z2 + lnGAMMA(d2/z2 + 1) - d2/z2 * ln(a2/z2));
    
    Be1 := 1 / (GAMMA(d1/z1 + 1, a1/z1) * x1 / GAMMA(d1/z1 + 1));
    Be2 := 1 / (GAMMA(d2/z2 + 1, a2/z2) * x2 / GAMMA(d2/z2 + 1));
    
    q1 := lambda1 * nu1 * Be1;
    q2 := lambda2 * nu2 * Be2;
        
     hg1 := hypergeom([p1, -d1 / z1 + 1 , a1 / z1 + p1 + 1], [a1 / z1 + p1], -z1 / a1);
     hg2 := hypergeom([-d1 / z1 + 1, p1 + 1, a1 / z1 + p1 + 2], [a1 / z1 + p1 + 1], -z1 / a1);
     hg3 := hypergeom([p2, -d2 / z2 + 1 , a2 / z2 + p2 + 1], [a2 / z2 + p2],-z2 / a2 );
     hg4 := hypergeom([-d2 / z2 + 1, p2 + 1, a2 / z2 + p2 + 2], [a2 / z2 + p2 + 1], -z2 / a2);
     
    w1 := z1 - q1 + a1 * (a1 + p1 * z1) * hg1 / ((a1 + p1 * z1 + z1) * p1 * hg2 );
                    
    w2 := z2 - q2 + a2 * (a2 + p2 * z2) * hg3 / ((a2 + p2 * z2 + z2) * p2 * hg4 );
    
    aprime := q1 + q2;
    zprime := (w1 * q1 + w2 * q2) / aprime;

    nx := exp(aprime/zprime + lnGAMMA(o/zprime + 1) - o/zprime * ln(aprime/zprime));
    nBe := 1 / (GAMMA(o/zprime + 1, aprime/zprime) * nx / GAMMA(o/zprime + 1));
          
end proc:

GRADIENT(OV);

 

How to convert "123" into integer 123

i use sprintf %d still can not convert to integer

Hi,

I would like to plot the region of solution of the following system defined by some equations.

restart; with(Optimization);
with(plots);

inequal({-5 <= 4*y1+2*y2+3*y3, -2 <= 3*y1+5*y2+2*y3, -1 <= y1+2*y2+y3, 0 <= y2, y1 <= 0}, {y1, y2, y3}, color = "Nautical 1");

Many thanks for any help

I have the following Polynomial F. Computing the genus shows that this curve has negative genus and thus is reducible. But using AFactor doesn't produce a factorization. Any ideas?

with(algcurves):
F := z^9+(-3/2+(3/2*I)*sqrt(3))*y^3*z^6+(-3/2-(3/2*I)*sqrt(3))*x^3*z^6+(-3/2-(3/2*I)*sqrt(3))*y^6*z^3+(-3/2+(3/2*I)*sqrt(3))*x^6*z^3+y^9+(-3/2-(3/2*I)*sqrt(3))*x^3*y^6+(-3/2+(3/2*I)*sqrt(3))*x^6*y^3+x^9-3*(x*y*z)^3:
z:=1:
genus(F, x, y);
evala(AFactors(F));

Pls what is the maple code for the fourth order Runge-kutta method for five systems of ODE of several variables?

I want to be able to make arrows on my axis to indicate positive direction, since it is a requirement at my school. I would like to do it with the "plots" function.

Here is what I wish I had in maple http://imgur.com/a/OXi5t

Hi Mapleprimes,,,


We see Maple file.

 

We are aware of oeis.org/A103435/


sequence data

0 2
1 4
2 16
3 48
4 160
5 512
6 1664
7 5376
8 17408
9 56320
10 182272
11 589824
12 1908736
13 6176768
14 19988480
15 64684032
16 209321984
b103435

 

Where F(m)=2*F(m-1)+4*F(m-2).


Goal - to increase refereed database.

 

M.mw

Regards,

Matthew Charles Anderson

Legislative Assistant

Oregon USA

Age 42.

5*x-7 = 3*x+2;
                             "(->)"
lhs(5*x-7 = 3*x+2) - rhs(5*x-7 = 3*x+2) = 0;
                          2 x - 9 = 0
                              [x]
isolate( 2*x-9 = 0, %ARG1 );
Error, (in isolate) 2*x-9 = 0 does not contain %ARG1
plz explain me what is this error?

If input a group of outputs which are binary numbers

can it simplify to give a logic that can output these outputs

If input ["1","1","2","2","2","77"]

output a graph such as

1 has 2 times

2 has 3 times

77 has 1 time

3.mw

There are 2 questions actually. The first as the title says is about taking the integral. I have 2 functions that were found numerically from the system of differential equations (see the file), and I need to take the integral of the expression that includes both of them. Maple gives me something like Int () = Int (), so it doesn't solve anything. Why can it be?

The second question is about varying the boundary conditions. If, for example, I have the system with the condition like R(x_0)=R_0, can I get the plot  of R(x,R_0)? In my case I need to vary conditions on R and mu (R(0)=R_0 and mu(0)=mu_0) and then get the plot of the integral in relation to R_0 and mu_0. Is it even possible?

Hello,

I have two simple module's:

1) ------------------------------------------------------------------------

Point := proc(xx::float,yy::float)
    return module()
        local x := xx,y := yy;
        export ShowPoint,GetX,GetY;
        
        ShowPoint := proc()
            printf("Point X,Y -> [%f,%f]",x,y);
        end proc;

        GetX := proc()
            return x;
        end proc;        
        GetY := proc()
            return y;
        end proc;    
    end module:
end proc:

2) ------------------------------------------------------------------------

PointMath := module()
    option package;  
    export `+`;
    
    `+` := proc(a::Point(float,float),b::Point(float,float))
        option overload;
        Point(a:-GetX()+b:-GetX(),a:-GetY()+b:-GetY());
    end proc;
end module:

------------------------------------------------------------------------

Next I use first module:

p1:=Point(1.2,1.4);

p2:=Point(1.0,2.0);

Finally I want to add above two points:

with(PointMath)

p2:=p1+p2

The results is:

p2:=p1+p2

Why is not called operator '+' and two points are not added?

Best,

Rariusz

 

 

 

Hi

How can I remove a subset containing a number from a partition?

eg S := [seq(2..5)]

P:=combinat:-setpartition(S, 2);

[[[2, 3], [4, 5]], [[2, 4], [3, 5]], [[2, 5], [3, 4]]]

I want to remove any partition involving 5

leaving

[[[2, 3]], [[2, 4]], [[3, 4]]]

i tried

remove(has,P,5)

 

 

Can someone answer why i get Float(undefined) while computing integral

Here is my example

NULL

restart

with(plots):

NULL

alpha0 := .3;

.3

(1)

R := .1;

.1

(2)

sigma := 636;

636

(3)

Kfc := 101;

101

(4)

Ksc := 9;

9

(5)

E := 2*10^5;

200000

(6)

`&delta;th` := 2*10^(-7);

1/5000000

(7)

`&delta;c` := 0.8e-1*10^(-3);

0.8000000000e-4

(8)

p := 400;

400

(9)

`l&delta;z` := 12.1*10^(-3);

0.1210000000e-1

(10)

lKz := 20.3*10^(-3);

0.2030000000e-1

(11)

eta := 10^(-5);

1/100000

(12)

l0 := 0;

0

(13)

xi := p/sigma;

100/159

(14)

KImax := evalf(p*sqrt(Pi*l));

708.9815404*l^(1/2)

(15)

``

`N&delta;` := evalf(E*sigma*(int((-xi^2+1)*(-KImax^2+Kfc^2)/((KImax^2-Ksc^2)*((-R^4+1)*(KImax^2+Ksc^2)+eta*E*sigma)), l = l0 .. `l&delta;z`))/alpha0);

Float(undefined)

(16)

``

NULL

NULL

NULL

NULL

NULL

``

``

``

``

``

NULL

NULL


 

Download N.mw

Thanks in advance

First 858 859 860 861 862 863 864 Last Page 860 of 2308