Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

I have a fairly old laptop, a Toshiba S10 Tecra, windows 7 64 bit and 4 Gb RAM.  It has an NVidia Quadro NVS 150m video card inside and according to NVidia CUDA capable of a compute level to 1.1 which is ok for float[4] but not float[8].  Inititiating the computecabability in maple does indeed bring a score level of 1.1.

Doing any LinearAlgebra matrix calculations with CUDA enabled is maybe 5x's slower than with it disabled.  I run into BLAS errors and screen blankouts at matrix values of 2000.  The video driver is the latest from Toshiba (2010) but not NVidia (2014) I suppose there would be an increased performace with newer drivers but if I'm going to run into the same issue of slower calculations with CUDA enabled there's no point in even testing the newer drivers on an otherwise fine running machine. 

Since it is a low end video card is CUDA even worthwhile, will I even notice a speed up with updated drivers?

                                                                          

Dear Maple Experts,

i am new to maple and I am trying to write a maple algorithm in order to calculate the GCD of two functions. 

I have defined the two functions and written the algorithm, but I get an error "Unable to Parse".

Here is my code:

restart; with(Algebraic); with(LinearAlgebra[Generic]); with(RegularChains); with(FastArithmeticTools); with(ChainTools); interface(rtablesize = 15);

f := (y^2-1)*((y+1)*x^4+(y^2-1)*x^3+(y^3-1)*x^2+(y^4-1)*x+y^5-1);

g := (y-1)*x^5+(y^2-1)*x^4+(y^3-1)*x^3+(y^4-1)*x^2+(y^5-1)*x+y^6-1;

SubRes:=proc(f,g,var): local  i,a, delta, beta, psi: if degree(f,var)<degree(g,var) then a[0]:=Algebraic:-PrimitivePart(g,var): a[1]:=Algebraic:-PrimitivePart(f,var): else a[0]=Algebraic:-PrimitivePart(f,var): a[1]:=Algebraic:-PrimitivePart(g,var): fi: delta[0]:=degree(a[0],var)-degree(a[1],var): beta[2]:=(-1)^((delta[0]+1)): psi[2]:=-1: i:=1: while a[i]<>0 do a[i+1]:=(prem(a[i-1], a[i], var))/(beta[i+1]): delta[i]:=degree(a[i],var)-degree(a[i+1], var): i:=i+1: psi[i+1]:=((-lcoeff(a[i-1],var))^((delta[i-2])))*((psi[i])^((1-delta[i-2]))): beta[i+1]:=-lcoeff(a[i-1],var)*(psi[i+1])^((delta[i-1])): od: print("Last Non-Zero Subresultant: ", sort(simplify(a[i-1])),y): return (Algebraic:-PrimitivePart(a[i-1],var)): end proc

and I get this error:

Error, unable to parse

Would you kindly help me to fix this issue?

Kind Regards,

Ash

 

Please I need someone to help out with how to solve the below ODE numerically using finite difference method with the necessary maple code:

 

█( S〗_h〗^' (t)=Λ_h-αβ_m I_v S_h-μ_h S_h+πI_m,  

〖I_m〗^' (t)=αβ_m I_v S_h-(σ_m+π+μ_h ) I_m

〖 S〗_v〗^' (t)=Λ_v-αβ_v I_m S_v-μ_v S_v

〖I_v〗^' (t)=αβ_v I_m S_v-μ_v I_v )

The initial conditions can be assumed. Suppose i want to include controls, how do I solve the problem and equally plot the graph.

 

Thank you.

ADENIYI MICHAEL

 

http://i.imgur.com/JGObjn5.png

 

I tried with and without evalf. Do I need to import something? or something like with Linear Algebra? 

This is pretty similar to my last question. but I found this maple code on a website that is suppose to find a vertex coloring of a graph G. The output is is supposed to be a list for example like [3, table([y = 1, k = 2, c = 2, m = 3, h = 1, x = 1] where the first part (in this case 3) is the number of colors and 1,2,3 in the second part are the colors to which each vertex is assigned.  However, no matter what graph I run this on I get everything equal to 1. such as [1, table([y = 1, k = 1, c = 1, m = 1, h = 1, x = 1])]. Why is this happening?  
color:=proc(G)
  local i, j, C, U, V, total_used;
  V:=Vertices(G); total_used:=1;
  C[V[1]]:=1;
  for i from 2 to nops(V) do
    C[V[i]]:=0;
  end do;
  for i from 2 to nops(V) do
    U:={};
      for j from 1 to nops(neighbors(V[i], G)) do
      U:=U union C[neighbors(V[i], G)[j]];
       end do;
    j:=1;
    while member(j, U) do
      j:=j+1;
     end do;
    C[V[i]]:=j;
    if j>total_used then
      total_used:=j;
    end if;
   end do;
  [total_used, eval(C)];
end:

Egor has two parents, four grandparents, and so on.
Write an explicit formula and a recursive formula for the number of ancestors Egor has if we go back n generations.                

what would be the figure back to 25 generations ?

Hej everyone,

I am trying to run a Maple script for multiple parameters on our cluster, so far so good. I found that I can pass for example a:=1 and b:=2 to a Maple script using

maple -c "a:=1;" -c "b:=2;" < script.mpl

Is that the best/only way? For convenience I would like to read the parameters from a file, my first idea was to work with sed, so I tried

maple $(sed -n 1'p' data) < script.mpl

This should take the first line from data (which is -c "a:=1;" -c "b:=2;"), so that I would expect to get the same result.
Unfortunately, this is not the case, only the first parameter a:=1 is passed correctly and non of the further parameters.

I've appended the files, I used.

This may be not a Maple problem but rather me making a mistake using sed, but maybe you can see where I made a mistake.

Thanks in advance,

Sören

 

a

b

c

Download script.mw

The mw-file has to be exported as an mpl-file first. In my case data just contains one line: -c "a:=1;" -c "b:=2;" -c "c:=3;" (I couldn't upload either)

I'm brand new to Maple and was assigned a problem to modify a code provided by my professor to incorporate variable window size. However, I don't know where to begin or what I'm doing. I've attached the link to the problem below. Plz help.  NA1_Project_IDW_01.2014_Fall.pdf

Let (G, ·) be a group and X any set. Let F be the set of functions with domain

X and range G. Define a binary operation ∗ on F by (f ∗ g)(x) := f(x) · g(x). Is

prove that this is so.

Yes, (F, ∗) is a group.

prove it.

Exercise Prove that (-1)u = - u in any vector space. Note that (-1)u means the number -1 is multiplied to the vector u, and - u means the negative vector in the fourth property of the definition of vector spaces.

Answer

Exercise Prove that (a1u1 + a2u2) + (b1u1 + b2u2) = (a1 + b1)u1 + (a2 + b2)u2 in any vector space.

Answer

Exercise Give a detailed reason why, in any vector space,

  • u + v = 0 ⇒ u = - v.

  • 3u + 2v - 4w = 0 ⇒ v = - 3/2 u + 2w.

error in( dsolve/numeric/bvp) unable to achieve the requested accuracy of 0.1e-5 with maximum 128 point mesh (was able to get 0.22e-4), consider increasing `maxmesh` or using larger `abserr`

 

The above is the error message displayed by maple 17. How do I correct this.

Thank you.

 

Adeniyi Michael

Mytest:=module()
    option package;
    
    export
        mymain
        ;
        
        
    # local a,b,c;

    uses LinearAlgebra;
    
    interface(rtablesize=infinity);
    
    
    mymain:=proc(n::integer)

        local ans;
        
        ans:=Vector(n);

        return ans;

    end proc;

end module;

Here is a short piece of code to create a Maple package. It runs fine. Is that possible to hide the code from print() ?

 

with(Mytest);

print(mymain); # which displays the source code

 

Could I hide some of the code? Say I want to use the function mymain() for debugging purpose, but I dont want to make it local to the package. Instead I keep it in "export", but I dont want users to see its code.

 

Thanks!

Hello I am a Maple 15 user and I am using the command fsolve to solve for the intersection of two curves over a specified interval in x, namely from 0 to the lim defined in the Maple document. The specified interval contains asymptotes and when I specify the full interval only one of the three solutions is returned even if I can see that there are three distinct solutions by looking at the plot of RHS and LHS. Should I use another technique to find the solution or is my implementation of fsolve command wrong?

Thanks in advance


restart

with(ListTools):

n1 := 1:

n2 := 1.50:

n3 := 1.40:

lambda := 1.3:

k0 := 2*Pi/lambda:

d := 3:

x0 := k0*d:

arg1 := sqrt(x0^2*(n2^2-n1^2)):

arg2 := sqrt(x0^2*(n2^2-n3^2)):

lim := FindMinimalElement([arg1, arg2]):

sqr1 := sqrt(x0^2*(n2^2-n1^2)-x^2):

sqr2 := sqrt(x0^2*(n2^2-n3^2)-x^2):

LHS := tan(x):

RHS := (sqr1+sqr2)/(x*(1-sqr1*sqr2/x^2)):

plot([LHS, RHS], x = 0 .. lim, y = -6 .. 6)

 

fsolve(RHS = LHS, x = (1/2)*Pi .. 3*Pi*(1/2))

2.634254816

(1)

fsolve(RHS = LHS, x = 3*Pi*(1/2) .. 9*Pi*(1/4))

5.222527128

(2)

fsolve(RHS = LHS, x = 9*Pi*(1/4) .. lim)

7.598486053

(3)

``


Download HW4Q2.mw

Hey guys,

i'd like to create a custom component for maplesim. I opened the template in maple18 and defined the following equations:

eq := [p(t) = p__0+rho*g*h(t), Q(t) = A*(diff(h(t), t)), L(t) = 100*h(t)/h(0)]

These equations describes a tank with a liquid in it. Now I tried to define a function L(t) (above) that gives the level of the tank in percentage. Therefore I need the initial height value at t=0. The function defined above (h(0)) does not work, cause maple tells me that the function does not exist.

Any hint how to get an initial value or a value at t=0? Or maybe another way to solve my problem?

Hopefully I described right. :-)

Best regards

Christian

First 219 220 221 222 223 224 225 Last Page 221 of 334