MaplePrimes Questions

Hello.
I'm new to Maple, so my question could appear idiotic. But, anyway. :-)

I want to understand the restrictions of code generation in Maple.
What functions could I convert to code?
Only listed in "Translation of Functions" block in this link?
http://www.maplesoft.com/support/help/MapleSim/view.aspx?path=CodeGeneration/General/TranslationDetails

For example, I've found this post - http://www.mapleprimes.com/posts/36616-Dynamic-Programming-In-Maple 

Could functions "Maximize" and "diff" be converted to Java, VB or something or not? If yes, how?

Thanks anyway. :-)

Maple syntax for solving for t:

solve(14.2857*exp(-t)-0.0045exp(-1.0175*t)-14.2857*exp(-(t-5))-0.0045exp(-1.0175*(t-5))+7.368=0, t);

Note: Equation was obtained from chemical engineering process control problem. This is the case for t > 5. For t < 5, we have:

solve(-0.2457+14.2857*exp(-t)-0.0045exp(-1.0175*t)+7.368=0, t);

I have tried multiple times for both cases, but Maple still runs forever. How can I solve this issue?

Im trying to plot the different values of shanks as points in this ] loop.

pp:=0.0:sumn:=0:sumnm1:=0:sumnp1:=0:

for i from 1 to 60 do

if(n>2) then sumnm1:=sumn fi;

if (n>1) then sumn:=sumnp1 fi; p:=1/evalf(2*beta*BesselJ(2,zeros[i])+epsilon*zeros[i]*BesselJ(0,zeros[i])+zeros[i]*BesselJ(1,zeros[i])); pp:=pp+p;

sumnp1:=pp;

if (n>2) then shanks:=(sumnp1*sumnm1-sumn*sumn)/(sumnp1-2*sumn+sumnm1) fi;

shanks;

od;

sumnp1: -2*sumn+sumnm1:

I have tried plotting it but it only plots the last value. 

Many thanks James

I recently installed Maple 17 from my university and greek letters do not work. For instance if I type alpha or any other greek letter, Maple just outputs a capital A in a box. I still have Maple 15 installed and it works on there and all the preferences seem the same.

Thanks


The purpose is to display the projection of a 3D plane, defined by the points of P. "res" contains the points projected on a 2D plane and all variables beginning with "vlak" contain the points from res that should be connected to form a plane. The command polygonplot connects the points. Every time, it gives the error message "Error, (in plots:-polygonplot) points are not in the correct format". When I copy the code to a place outside the procedure, I discovered some variables are not defined.

restart:with(linalg):with(LinearAlgebra):with(VectorCalculus):with(plots): eerste:=proc(V,N,P) local M,M1,M2,I4,NT; NT:=Transpose(N); M1:=V.NT; I4:=IdentityMatrix(4); M2:=(N.V).I4; M:=M1-M2; M.P; end proc: tweede:=proc(OS,r,s,P1) local VC,K: K:=Matrix(4,3,[r,s,OS]); VC:=(MatrixInverse(Transpose(K).K)).Transpose(K); VC.P1; end proc: project:=proc(P,V,N,OS,r,s) local P1,P2,i,j,n: P1:=eerste(V,N,P); P2:=tweede(OS,r,s,P1); n:=ColumnDimension(P2); for i from 1 to n do for j from 1 to 2 do P2[j,i]:=P2[j,i]/P2[3,i]; end do: end do: DeleteRow(P2,3); end proc: P:=Matrix([[ 0 , 10 , 10 , 0 , 0 , 10 , 10 , 0 , 5 ], [ 0 , 0 , 10 , 10 , 0 , 0 , 10 , 10 , 5 ], [ 0 , 0 , 0 , 0 , 30 , 30 , 30 , 30 , 40 ], [ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ]]): V:=Vector([60,60,50,1]); N:=Vector([1,0,0,0]); OS:=Vector([10,10,0,1]); r:=Vector([0,1,0,0]); s:=Vector([0,0,1,0]); Vector[column](%id = 18446744073889448174) Vector[column](%id = 18446744073889448414) Vector[column](%id = 18446744073889448534) Vector[column](%id = 18446744073889448654) Vector[column](%id = 18446744073889448774) translatie:=t->Matrix([[ 1 , 0 , 0 , 1*t ], [ 0 , 1 , 0 , 1*t ], [ 0 , 0 , 1 , 0 ], [ 0 , 0 , 0 , 1 ]]); [1 0 0 VectorCalculus:-*(1, t)] [ ] [0 1 0 VectorCalculus:-*(1, t)] t -> [ ] [0 0 1 0 ] [ ] [0 0 0 1 ] f:=proc(t) local volgende,res,vlak_onder,vlak_links,vlak_voor,vlak_rechts,vlak_boven,vlak_achter,vlak1,vlak2,vlak3,vlak4,pp1,pp2,pp3,pp4,pp5,pp6,pp7,pp8,pp9,pp10: volgende:=MatrixMatrixMultiply(translatie(t),P): res:=project(volgende,V,N,OS,r,s): vlak_onder :=Transpose(Matrix([Column(res,1),Column(res,2),Column(res,3),Column(res,4)])): vlak_links :=Transpose(Matrix([Column(res,1),Column(res,2),Column(res,6),Column(res,5)])): vlak_voor :=Transpose(Matrix([Column(res,2),Column(res,3),Column(res,7),Column(res,6)])): vlak_rechts:=Transpose(Matrix([Column(res,3),Column(res,4),Column(res,8),Column(res,7)])): vlak_achter:=Transpose(Matrix([Column(res,1),Column(res,4),Column(res,8),Column(res,5)])): vlak_boven :=Transpose(Matrix([Column(res,5),Column(res,6),Column(res,7),Column(res,8)])): vlak1:=Transpose(Matrix([Column(res,8),Column(res,7),Column(res,9)])): vlak2:=Transpose(Matrix([Column(res,8),Column(res,7),Column(res,9)])); vlak3:=Transpose(Matrix([Column(res,8),Column(res,5),Column(res,9)])); vlak4:=Transpose(Matrix([Column(res,5),Column(res,6),Column(res,9)])); pp1:=polygonplot(vlak_onder): pp2:=polygonplot(vlak_links): pp3:=polygonplot(vlak_voor): pp4:=polygonplot(vlak_rechts): pp5:=polygonplot(vlak_achter): pp6:=polygonplot(vlak_boven); pp7:=polygonplot(vlak1); pp8:=polygonplot(vlak2); pp9:=polygonplot(vlak3); pp10:=polygonplot(vlak4); {pp1,pp2,pp3,pp4,pp5,pp6,pp7,pp8,pp9,pp10}: end proc: display(f(0),scaling=constrained); Error, (in plots:-polygonplot) points are not in the correct format

Above, you can see the code. When only pp1->pp7 is displayed, and pp8->pp10 is placed between commenting marks, it works fine. Otherwise it doesn't work, it looks like Maple does not define the variables pp8->pp10. I don't understand because there is no difference between pp7 and pp8.

Thanks in advance

I have 2nd order nonlinear ode I try to solve with Runge Kutta 4th order method in maple but all I get from the outcome was 1 and 0.This is the equation:theta_ode1.mw . How do I do it Or how do I write the code to solve it with maple using  Runge Kutta 4th order method?

Evaluate the limit \lim_{x\rightarrow 0}\frac{x-\sin(x)}{x^3} without using hopital rule or taylor series.

Good morning sir.

 

I request your kind support to the above cited question.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

Dear Mapleprimes members,

I am trying to understand some known classical theorems of geometry (thales intersection thm, ceva, menelaus ) from the perspective of affine geometry and projective geometry.(my paper/pencil work is ok.. But I would like to use  Maple to visualize -if possible - geometrically some theorems and properties in a graph)

How could I do it in maple? Where may I get some examples?

thank you,

 

JeanJ

I have 2nd order nonlinear ode I try to solve with Runge Kutta 4th order method in maple but all I get from the out is 1 and 0.This is the equation: theta_ode.mw . How do I do it Or how do I write the code to solve it with maple using  Runge Kutta 4th order method?

Maple can plot a function that is a convolution of Dirac delta-function and some regular function.

restart

with(plots); a := 1.0

f := proc (x) options operator, arrow; exp(-abs(x)) end proc
G := proc (x, xi, t) options operator, arrow; `if`(t = 0, Dirac(x-xi), (1/2)*exp(-(1/4)*(x-xi)^2/(a^2*t))/sqrt(Pi*a^2*t)) end proc


u := proc (t, x) options operator, arrow; int(G(x, xi, t)*f(xi), xi = -infinity .. infinity) end proc; plot(u(0., x), x = -3*Pi .. 3*Pi)

1.0

 

proc (x) options operator, arrow; exp(-abs(x)) end proc

 

proc (t, x) options operator, arrow; int(G(x, xi, t)*f(xi), xi = -infinity .. infinity) end proc

 

 

Hovewer, it is unable animate this function (the first frame is empty).

n := 10:

 

``

Is it a bug? Is there a nice workarround of this bug?

Download Heat_Equation2.mw

How do you find the perimeter of an ellipse using maple?

For eg, x^2/20+y^2/13=1

Need help with starting this question. Thanks!

If a sequence is defined by X0=0, X1=1, X2=2 and Xn=n(Xn-3+Xn-2+Xn-1), n>=3

How many digits will X2013 have?

I have no idea how to start to answer this question. Please help Thanks!

Let G(x) denote the no. of ways of representing n as the sum of two prime numbers.

For eg, G(10)=2: where 10=3+7=5+5

           G(20)=2: where 20=3+17=7+13

           G(30)=3: where 30=7+23=11+19=13+17

How do you find G(10 000 000)?

I assign a function like so: f:=x->0.2*x^2*(x-3)^3

Then using d/dx in the expression palette I differentiate: d/dx f(x)

Get the following: 0.6x^2 (x-3)^2 D(x^2)(x-3)

What is the "D" in the last expression? What hasn't the whole differentiation been completed?

First 1509 1510 1511 1512 1513 1514 1515 Last Page 1511 of 2433