Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I have the following construct:
for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0  and if(modp(cubeprod,2)<>0 then
cubesum(cubeprod);// I need both if statements to be true in order to invoke cubesum(). I've noticed that using an and between both if statements is incorrect but :

for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0 then 
 if modp(cubeprod,2)<>0 then cubesum(cubeprod) fi;
end if;
end do;

gives me an error as well. What is the right syntax to achieve this?

I have the following procedure to do the above. It works but it returns [9,10],[10,9],[12,1] for n=1729(for example). How do I modify this to 

a) to count 9,10 and 10,9 as the same and hence only show one of them

b) get 1,12 to show as a solution?

cubesum:=proc(n::nonnegint)
global listcub:=table();
local k:=0, x:=iroot(iquo(n,3),3),y:=x,x3:=x^3,y3:=y^3;
if 3*x3 <> n then x=x+1; x3:=x^3;y:=x;y3:=x3 end if;
while x3<=n do
y:=iroot(n-x3,3); y3:=y^3;
if(x3+y3 = n) then k:=k+1; listcub[k]:=[x,y]end if;
x:=x+1; x3:=x^3;
end do;
convert(listcub,list);
end proc:

 

Hi
I have my question makes any sense. I am from Denmark and not used to write math in english.

I have an characteristic matrix with an variable λ that takes on differen values.

How do I write λ in the matrix so Maple knows that when I call out a row with the variable λ in it and asssign

λ to a specific value, Maple changes λ to the specific value.

 

Example (I was thinking something like this):

A:=Matrix(2,2,[(1-λ_i),2,3,(4-λ_i)])

λ_1:=2

λ_2:=4

A[1],λ_1               (1-2) 2

A[1],λ_2               (1-4) 2

A[2],λ_1               3 (4-2)

A[2],λ_2               3 (4-4)

Hi, I am an student and I am currently working on a system that sketches the relation of predator and prey of yellowstone's gray wolf and elk. I tried using the Lotka-Volterra model, but I wanted to add more parameters and add a carrying capacity for the system. Unfortunatley I cannot find a way to edit the Lotka model to my needs, and because I am new i do not know how to create my own model. This is the two equations I want to use: (D(x))(t) = alpha*x(t)-ax^2/k-b*x(t)*y(t)-gx(t), (D(y))(t) = -beta*y(t)+c*x(t)*y(t)-gy(t)

were k is carrying capacity.

Basically what I am asking is that if someone can help make the system workable on Maple and some steps of how to do it. 

Is there a way to tell Maple to export a figure to PDF with a proper bounding box, like all of its other graphics export formats?

To export a graphics produced by Maple's plot(), I right-click on the plot, select Export, and then one of the several choices of graphics formats.  All options, other than the PDF, work fine—they produce graphics files whose bounding boxes correspond to the extents of the image.  Exporting to PDF misbehaves—it produces the equivalent of a 8.5''x11'' paper and inserts the graphics somewhere near the upper left corner.  I am absolutely at a loss to see the utility of that.  What in the world is the use of such an export?

Is there a configuration setting that tells Maple to save to PDF with a proper bounding box?  I looked around but couldn't find one.

Below is my code:

> restart:
> q:=1.6*10^(-19):e0:=8.85*10^(-12):k:=1.38*10^(-23):t:=300:ni:=1.45*10^(16):eox:=3.9*e0:esi:=11.7*e0:
> tox:=2*10^(-9):tsi:=25*10^(-9):L:=1*10^(-6):cox:=(eox/tox):csi:=esi/tsi:a:=sqrt(q^2*ni/(2*k*t*esi)):V:=0:vgs:=2:u:=0.04:
> mm:=(cos((q*cox*(vgs-psi11)/(esi*k*t*a))*(exp(q*(V-psi11)/(2*k*t))))-((2*q*cox*(vgs-psi11)/(esi*k*t*a^2*(tsi)))*(exp(-q*(psi11-V)/(k*t))))):
> psi1:=solve(mm=0,psi11);
psi1 := 0.5434311697 - 0.003168514913 I
> mm:=(cos((q*cox*(vgs-psi22)/(esi*k*t*a))*(exp(q*(vds-psi22)/(2*k*t))))-((2*q*cox*(vgs-psi22)/(esi*k*t*a^2*(tsi)))*(exp(-q*(psi22-vds)/(k*t))))):
> qq2:=seq(solve(mm=0,psi22),vds=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2]):
> psi2:=(vector([qq2]));vds:=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2]:
psi2 := [0.5434311697 - 0.003168514913 I, 0.6398902333 - 0.003560933110 I,

0.7360983262 - 0.003949922699 I, 0.8586260376, 0.9544714953, 1.066786341,

1.145104060, 1.239782678, 1.333965608, 1.427671475, 1.521739902,

1.612717888 + 0.004670871971 I, 1.699606898 + 0.007295737134 I,

1.782802467 - 0.009645080463 I, 1.913366188, 1.969622161, 1.996631837,

1.999909512, 1.999998089, 1.999999960, 1.999999999]
> for i from 1 to 21 do
> Qgg[i] := Re( tsi*cox*L*(1/6*psi2[i]^3-1/2*psi2[i]^2-1/2*psi2[i]^2*vgs-1/2*psi2[i]^2*k*t/q+1/2*psi2[i]*vgs^2+psi2[i]*k*t*vgs/q+psi2[i]*vgs-8*psi2[i]*esi*k*t/(q*tsi*cox)-64*esi^2*k^2*t^2*ln(-8*esi*k*t-q*tsi*cox*vgs+q*tsi*cox*psi2[i])/(q^2*tsi^2*cox^2)-1/6*psi1^3+1/2*psi1^2+1/2*psi1^2*vgs+1/2*psi1^2*k*t/q-1/2*psi1*vgs^2-psi1*k*t*vgs/q-psi1*vgs+8*psi1*esi*k*t/(q*tsi*cox)+64*esi^2*k^2*t^2*ln(-8*esi*k*t-q*tsi*cox*vgs+q*tsi*cox*psi1)/(q^2*tsi^2*cox^2))/(k*t*(vg-psi2[i])/q+1/8*(vgs-psi2[i])^2+4*k^2*t^2*esi*ln(cox(vgs-psi2[i])+8*k*t*esi/(q*tsi))/(q^2*tsi*cox)-k*t*(vg-psi1)/q-1/8*(vgs-psi1)^2-4*k^2*t^2*esi*ln(cox(vgs-psi1)+8*k*t*esi/(q*tsi))/(q^2*tsi*cox)));
> end do:
> Qg:=simplify((Qgg));
/[ -15
Qg := TABLE\[1 = Float(infinity), 2 = -2.726896811 10 ,

-15 -15 -15
3 = -2.681258392 10 , 5 = -2.579829239 10 , 4 = -2.623431373 10 ,

-15 -15 -15
7 = -2.495397349 10 , 6 = -2.529657206 10 , 10 = -2.378078479 10 ,

-15 -15 -15
11 = -2.341729539 10 , 8 = -2.454901580 10 , 9 = -2.415751244 10 ,

-15 -15 -15
15 = -2.212746094 10 , 14 = -2.250797897 10 , 13 = -2.277803789 10 ,

-15 -15 -15
12 = -2.308132152 10 , 21 = -2.192572935 10 , 20 = -2.192572943 10 ,

-15 -15 -15
16 = -2.198907782 10 , 17 = -2.193213670 10 , 18 = -2.192589892 10 ,

-15]\
19 = -2.192573293 10 ]/

 

i have to plot Qg with respect to vds. the value of Qg are stored in a table which have mixed entries. also please suggest how can i set the x-axis of the plot in decimal notation?

 

Regards

 

Hello,

please explain how to write a code to calculate and output the actual area using integration for y=X^3 over range (0,2) using left-hand rule and 200 subdivisions?

 

Thank you 

I currently have a function quadsum(n) that determines the [x,y] solutions of the above equation for an integer n. :

quadsum:= proc(n::nonnegint)
local
k:= 0, mylist:= table(),
x:= isqrt(iquo(n,2)), y:= x, x2:= x^2, y2:= y^2;
if 2*x2 <> n then x:= x+1; x2:= x2+2*x-1; y:= x; y2:= x2; end if;
while x2 <= n do
y:= isqrt(n-x2); y2:= y^2;
if x2+y2 = n then k:= k+1; mylist[k]:= [x,y] end if;
x:= x+1; x2:= x2+2*x-1;
end do;
convert(mylist, list)
end proc:

How would I alter this so that I get [x,y] for n= (5^a).(13^b).(17^c)(29^d) for non-negative integers a,b,c,d?

Hi everyone,

Consider the following worksheet (Maple 13):

Euler.mw

 (or as a Google Drive link)

https://drive.google.com/file/d/0Bzr3EyK8arkOUkZPcEE5b0NySVU/view?usp=sharing

Choose execute entire worksheet on both Maple 13 and Maple 18.

Maple 13 is blindingly fast at 40 seconds, entire wroksheet upon completion

Maple 18 crawls and hangs forever.

 

Can anyone recognise what the problem with Maple 18 is?

Running on a two core 1.7GHz AMD Athlon.

 

Many thanks

--

Yiannis

  Hi there,

  I want to use maple 13 for calculating mean value theorem for differentiable function  f:=piecewise(-2≤x≤0, -x2 ,0≤x≤2,x2

on the interval [-2,2]. But an error occured, that is,"function must be continuous".Any help will be appreciated.

REGARDS

 Yegan

 

please is there any one can help me to find a solution of a sytem of 3 non linear equations each with 3 variable and with more than 30 unknown coefficients

this is the system

solve({EEE_x(x, y, z) = 0, EEE_y(x, y, z) = 0, EEE_z(x, y, z) = 0}, {x, y, z})

where x,y,r are the unknowns

and the three equations are simply the partial derivative with respect to x,y and z repectively

EEE_x(x,y,z):=(&DifferentialD;)/(&DifferentialD; x) EE(x,y,z)

EEE_y(x,y,z):=(&DifferentialD;)/(&DifferentialD; y) EE(x,y,z)

EEE_z(x,y,z):=(&DifferentialD;)/(&DifferentialD;z)EE(x,y,z)

the main equation is EE where (it has 3 variables and more than 30 qunknowns coefficients

(x, y, z) ->

1
----------------------------------------------------------------
2
/ 2 2 2\
hh \ii + jj x + ll z + mm y + 100. y + nn y z + oo x + pp z /

/ 2 2 2 2 3 2
\p z y + q z y + l z x + g z x + o z y + n z x + m y x

2 2 2 3 2 2 2
+ j y x + k y x + i z y + d z y + f z x + h z y

2 2 4 3 2 3
+ e y x + u z y x + v z y x + a + b x + c x + r x + s z

2 2 4 3 4 \
+ t z + bb z + cc y + dd y + ee y + ff y + gg z + aa x/

 

A rigid rotating body is a moving mass, so that kinetic energy can have expressed in terms of the angular speed of the object and a new quantity called moment of inertia, which depends on the mass of the body and how it is such distributed mass. Now we'll see with maple.

 

Momento_de_Inercia.mw

(in spanish)

Atte.

L. Araujo C.

1.  a procedure quadsumstats whose input is an integer n. This procedure should return a list of length 

n whose kth  entry is the number of solutions to
x^2 + y^2 = k 
for
1 <= k and k <= n

I am sort of confused as to how to construct that list of length n and how to obtain integer solutions to the equation in maple.

2.

a procedure firstCount(k) that finds the first integer
n
with
k
representations as
"x^2+y^2= n." What does it mean for an integer to have k representations?

 

 

 

 

In this section, we will consider several linear dynamical systems in which each mathematical model is a differential equation of second order with constant coefficients with initial conditions specifi ed in a time that we take as t = t0.

All in maple.

 

Vibraciones.mw

(in spanish)

 

Atte.

L.AraujoC.

I am trying to use maple to plot a poincare section for the following Hamiltonain:

H:=(1/8)*(p1^2+16*p2^2-4*p1*p2*cos(q1-q2))/(3+sin(q1-q2)^2) - cos(q2)-8cos(q1)

I've been using Maples built in command as follows:

poincare(H, t=-5000..5000, ics, stepsize = 0.1, iterations = 1, scene = [q2,p2]);

for a given set of initial conditions ics. My problem is however I need to restrict the plotting value to p1>0, as otherwise i seem to get two overlapping maps as seen below:



How exactly can i do this?
Thanks
Connor

First 1264 1265 1266 1267 1268 1269 1270 Last Page 1266 of 2224