MaplePrimes Questions

Dear Friends

I am trying to find determining system for variable coefficient KdV equation, this system is required to find relevant point symmetries for said equation. Following is set of command that I used to perform task:

This last cammand gives me determining system for PDE1.

Following is direct procedure to find determining system:

This last command give large expression from which determining system is obtained by equating coefficient to zero which does not matches with determining system obtained with first procedure.

What could be the possible error?

I have also attached relevant Maple18 file for analysis.

[411]_Determing_Equations_for_Variable_coefficient_KdV.mw

Here is one I have been struggling with lately:

I have a relatively large module with many procedures inside (plus some other data structures). In one of the procedures, it turns out that it would be convenient to have a subprocedure defined inside to both shorten the code by avoiding duplication as well as make it more error proof (once the subprocedure is debugged it'll be correct everywhere it is used). Here is the skeleton

Lattice:=module() option package;
export Track;   ...
   Track:=proc(arguments) uses LinearAlgebra;
   local trackElement;
      ...

      for ... do
         result:=trackElement(parms); # This does not work
         ...
      end do

      trackElement:=proc(arguments) uses LinearAlgebra;
         ...
      end proc; # trackElement

   end proc; # Track;

end module; # Lattice

The problem I have is that procedure trackElement is not recognized as i found out running the code in the debugger. I can make it work by taking trackElement out of Track and make it local to the Lattice module. While functionally this works (and it is how I have it now programmed), I do  not like it as every proc in the Lattice module can see trackElement. That should not be so, I want it local to procedure Track, which is where it belongs.

I really thought I could define procedures within procedures. Am I wrong? Or is there something else ging on?

TIA,

Mac Dude

PS: The whole module is more than 100 kB of Maple code sitting in a library. I refrain from uploading it here as it would be non-trivial to get going even for a simple test case.

So basic problem.

 

I want to create a list with undetermined size. I have some data, let's say these data objects are numbers for now (they can be expressions of variables, or even equations)

 

Here is a pseudocode,

 

for n=1:10

  list(n) = n+1;

end

 

So the above for loop will create a list of size 9, with objects being number 2 through 11.

 

I want the list to be in {} form

 

Now I awnt to take this further. Let's say my data objects aren't just numbers, but expressions. How would I create a list of expressions and turning them into an equation?

 

Example

 

e1 := a^2 + b

e2 := b + a*b

 

e3:= b*a + a*b^2

 

Pesudocode

 

for i = 1:3 do

list(i) = ei ~=0;

end

 

Output should look like

 

list = {a^2 + b = 0, b + a*b=0,b*a + a*b^2=0}

 

Notice the use of curly braces

 

hi

how can I download Fourier series package?

Hello Primers

I am doing some homework with the software Maple 2015 where I am supposed to design a lamp through creating some line segments and a circle in a 2d coordinate system. But my question is, how do I add a third dimension and rotate all these line segments around the y-axis, so I can get an idea of how it looks like in 3d?

Here is a picture

Thanks in advance

Dear Friends

I need to arrange legends from 2 to 1.2

Please hint me

Thanks

 

restart:
e := x*t*(E[c]-E[m])/((2*(x+2))*(x*E[c]+E[m])):
EZ := (E[m]-E[c])*((t-2*z-2*e)/(2*t))^x+E[c]:
assume(x > 0):
d := int(EZ*z^2/(-nu^2+1), z = -(1/2)*t-e .. (1/2)*t-e):
R := simplify(subs(E[c] = k*E[m], d/subs(x = 0, d))):
LS[1.2] := solid:LS[1.4] := longdash:LS[1.6] := dash:LS[1.8] := spacedash:LS[2.0] := dashdot:
for k from 1.2 by .2 to 2.0 do
p[k] := plot(R, x = 0 .. 5, color = black, axes = framed, font = [Times, 13], size = [650, 550], resolution = 1200, legendstyle = [location = right], legend = ['E[c]/E[m]' = k], linestyle = LS[k], thickness = 2, labels = ['n', 'P[FG]/P[Metallic]'], labelfont = [Times, 14], tickmarks = [10, 15])
end do:
with(plots):
display({`$`(p[1+.2*m], m = 1 .. 5)});

 

 

Hi,

Is it possible to use the command MatrixFunction with two matrices as:

with(LinearAlgebra):

A := Matrix([[-13, -10], [21, 16]]); B := Matrix([[3, 0], [21, 16]]);

BesselY(A,B) ?

In the maple help we can do the calculation only for one matrix as:

MatrixFunction(A, sin(x), x);

Thank you

how to make below can be successfully run?

normaldiff := proc(f1)
return limit((subs(x=x+h,f1)-f1)/h, h=0):
end if:
recurdiff := proc(f2)
if f2 = 0 then
return 0:
end if:
if f2 <> 0 then
return limit((subs(x=x+h,normaldiff(f2)+recurdiff(f2))-(normaldiff(f2)+recurdiff(f2)))/h, h=0):
end if:

f := x;
normaldiff(f)+recurdiff(f);

expect return 1, is like normal diff

 

Hi I am reading this help document

http://www.maplesoft.com/support/help/Maple/view.aspx?path=SpaceCurve

and I cannot get maple to plot the same exact graph on that page, I receive this error

http://prntscr.com/8gzpt4

It only lets me plot 3 dimensional curves http://prntscr.com/8gzsry

When I downloaded the help document, the command executed. I cannot get it to work on my worksheet.

I even tried adding with(Student[VectorCalculus] ): and that did not help. 

I am clueless why this is not working.

Is there a way to upload a maple worksheet so you can see the error.

Hi, I'm new to Maple and have been trying to solve the below curve intersection. But the answer I am getting from Maple is incorrect and does not tally with the plot when drawn on excel, am I doing something wrong ???  (the intersect should be around x=93.9)

 

restart;
eq1:=y=86:
eq2:=y=-0.0000054527x^3+0.010903836x^2+0.0714244709x+74.18816:
sol:=solve({eq1,eq2},{x,y});

Hi Maple People,

I want to plot two parametric curves on the same plot.  Namely,

x1 = t^2 + t + 41; y1 = t^2 + 40;

x2 = 4*t^2 + 163; y2 = 2*t^2 + t + 81;

where -3 < t < 3

What is the syntax for this?

Regards, Matt

 

Hey,

i am trying to put u[0](zeta):=0 in maple but it gives an error, however it accepts u[0]:=0 but i have to involve zeta in it. help please.

 here is my program 

bc1 := u(x, y)-0;
dydxf := (1/2)*(-u[m+2](zeta)-3*u[m](zeta)+4*u[m+1](zeta))/h; 
bc1 := subs(diff(u(x, y), x) = subs(m = 0, dydxf), u(x, y) = u[0](zeta), x = 0, bc1);
eq[0] := bc1;
u[0](zeta):=(solve(eq[0],u[0](zeta)));

on pressing enter a new window opens of title

clerify expression.

parts of expressions are ambigous. please select one of the suggested meanings.

function defination or remember table assignment.

then it gives the error below
Error, unable to parse

:=(Zeta)->(solve(eq[0],u[0](Zeta)));

Hi,

why the output for this program just only "print BChange" not a matrix?

 

Der:=proc(A,n)

local i,j,k,t,S1,S2,l,C,sols,eqns,BChange;

C:=matrix(n,n); BChange:=matrix(n,n); eqns:={};

for i to n-1 do

  for j from i+1 to n do

    for l to n do

      S1:=sum(A[i,j,k]*C[k,l],k=1..n);

      S2:=sum(A[k,j,l]*C[i,k]+A[i,k,l]*C[j,k],k=1..n);

      eqns:=union(eqns,{S1=S2})

    end do

  end do

end do;

 

sols:=[solve(eqns)];

t:=nops(sols);

for i to t do

  for j to n do

    for k to n do

      BChange[j,k]:=subs(sols[i],C[j,k])

    end do;

  end do;

end do;

print (BChange)

end proc:

 

> A1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 2) = 1]):
> Der(A1, 2);
                                                                   print BChange

 

Can someone please advice me on this?

thanks

witribm

 

Bad title, I know. 

Suppose I have solved an ODE numerically, say for a function f(x). Now, I want to solve another ODE numerically, given by

diff(g(x),x) = f(x)*g(x)

I want to solve for g(x), and I only know f(x) from the numerical solution I obtained in the first ODE. How do I implement this in Maple?

I attached a worksheet with my naive attempt with this simple example. Basically I do not know how to set up the differential equation which I would then input to dsolve. 

ode.mw

Thanks!

First 1234 1235 1236 1237 1238 1239 1240 Last Page 1236 of 2434