Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear bright people of MaplePrimes, 

I'm stuck in a problem with dsolve.

I have a ODE system that I would like to solve numerically (because it's huge) in vars: var1(t), var2(t), var3(t), etc... Inside the ODE there are procedures with arguments like proc(f(x,y), a, b, c, etc...) where f(x,y) is a function for a curve (so x and y are variables) and a,b,c are numeric. 
Procedures have been written as indicated in the help page, i.e. differentiating whether the procedures are called with symbolic arguments or numeric arguments. So I call dsolve specifying the "known" procedures and a numeric method. Maple sets the problem correctly. However, when it tries to solve the equations numerically it points out that in the ODE ys there are some undefined parameters. Specifically, those parameters are x, y. But, again, x and y are not parameters but variables that are used in the procedures within the ODEs. 

I tried to include x and y as parameters and solve the system. However, before retrieving the solution, a numerical value must be given to all the parameters. 

What should I do if I need to keep f(x,y) symbolic in my procedures but I want to solve my ODE numerically? 

Thank you for supporting me. 
Thank you so much. 

Andrea



 

 

Hello,

I am trying to get Maple to display sin2(x)  rather than (sin(x))2.  In particular I am trying to have it output the latex for the prior using latex(sin^2(x) , output=string), or similar.

Any ideas would be greatly appreciated.

 

Thanks,

Mark

 

To determine whether or not equilibrium points of a nonlinear ordinary differential equation is globally stable, a Lyapunov function is often employed. Since there are no general methods for constructing Lyapunov functions, May I know if there are methods in MAPLE that can be used to determine these Lyapunov functions? Thanks

Just want some input if anyone thinks this is a bug or not

Hiding the contents of equation labels in one table (table -> properties -> uncheck show equation labels) removes all reference to the labels within that table.  Is that supposed to occur?

The table below has show equation labels checked.  If I uncheck the show equation labels in the first table I would expect the reference labels (1) and (2) to disappear and (3) and (4) references in the next table to remain unchanged.

However unchecking show equation labels in the first table relabels the two equations in the second table to (1) and (2) as shown below.  Is this a bug?

However this doesn't disrupt further content in the worksheet if references were made to equation label (1). After unchecking show equation labels in the first table, all original references to label (1) are replaced with the actual value (sin(x))

I have a series with an integral inside the series.  I have worked the problem 2 different ways using sum vs Sum.  The integration variables are independent of the series variables so swapping the order of operation should not matter, but in the case, (S2), I do get a difference & I do not understand why.  The explanation fo INERT vs ACTIVE I do not think explains this.  The reason why I say this is because S1 the ACTIVE sum concurs with the INERT expressions S3 & S4.  S2 is swapping the order of operation for the ACTIVE sum does not yield the same result as the other 3 cases.  Why is this?  I am at a loss so including examples would be helpful to me.

swapping_orders_of_operation.mw

I'm a new Maple user so there may be a better way to do this, but Maple is not handling units the way I would expect.

Here is an example document (inline graphical below, also here: Plots_With_Units.mw) showing the impedance of a parallel resistor, inductor, and capacitor.  The plot is correct and it shows kHz along the abscissa like I want.  In order to get this I used kHz in the range fr, which is fine, but I had to also use kHz in the basic definition functions for Zl and Zc.

Now in order to get correct results from any of the Z functions I must use them with a kHz argument for f.  If I want to use them where other unit multipliers are more appropriate they won't work right, and many times I don't know what the appropriate multiplier should be until I'm into the design.  Then I need to go back and change the multipliers in the functions.  Or maybe in a single design I'll want to show Hz and kHz for the same function.

This seems like confusing units and dimensions.  The dimensions of inductive impedance (Zl), for example, can be expressed as frequency times inductance.  Whether the frequency is in units of Hz, kHz, or uHz doesn't matter and should simply scale the results.  I should be able to specify functions in dimensions and use units elsewhere as I want for convenient plotting and result formatting.

Is there a better way to do this, or is it a limitation in Maple?  The overall goal is to define functions with units but be able to use them and to format plots in whatever other units I like.

restart;
with(PDETools);
diff(r(t), t)-(diff(a[3](t), t))*r(t)/a[3](t)+a[1](t)*p[3](t)-3*r(t)*r(t) = 0;
                                        
dsolve(diff(r(t), t)-(diff(a[3](t), t))*r(t)/a[3](t)+a[1](t)*p[3](t)-3*r(t)^2 = 0, r(t));

 it does not give any solution ,please help.

how to solve optimal system of vector   fields in lie theory in maple?

What is a suitable replacement for eliminate?

Here is my code:

 

A := {x[5] = x[2]/x[1], x[6] = x[3]/x[2], x[7] = x[1]/x[4], x[8] = (2*x[2]+x[4])/(2*x[1]+x[3]+x[4])};
B := {x[1], x[2], x[3], x[4], x[8]};

([eliminate])(A, B);
([eliminate])(A, B minus {x[1]});
([solve])(A, B);


In the older versions of Maple the first example of eliminate would return same result as the solve example, but with current version I need to resort to the second example.

Hi, I need to calculate some discrete variational problems, but it's a hard work just by hand.

Is there any toolboxes about the discrete variational computation? Or how to design a program to do that?

In particular, I need to realize the functions:

1. the linearized operator and the adjoint operator of some expressions.

       For example:

       the linearized operator of u(n,m+1)u(n+1,m) is u(n+1,m)Tm+u(n,m+1)Tn

       the adjoint operator is u(n+1,m-1)T^(-1)m+u(n-1,m+1)T^(-1)n,

       (The latter is just the discrete Euler operator.)

      Tm, Tn is the shift operator, T^(-1) is the inverse operator of T.

2. discrete Euler-Lagrange equation.

I am not familar with the maple, please help!

Thanks.

How do I introduce the first derivative of M when i<> k and aij when i <> j and aii in Maple?

 

 

Am trying to teach myself "circle inversion" to solve circle geometry problems.  Towards this end I wrote a Maple 7 program to draw a Pappus chain of circles.  Pappus lived around 200AD, and I read that he considered this problem ancient!  

   The output diagram may not come out on this forum, but it comes out as a collection of tangential circles, and I have no problems with that.  In drawing the circles I was thinking of using the infinity symbol.  The following line uses the infinity, but with a minus sign.  Maple is "happy" with this and outputs square braces, suggesting an empty list?  I changed the program by omitting the -ve sign - and Maple came up with an error message.  I would have expected the output to include the value zero  ie [0]  I think it is just that the infinity symbol is not allowed in the seq command. 

[seq( i, i=0..-infinity )];  #???  why the -?,

 

In the next part I define X, Y and rad as the coordinates and radii of a sequence of circles: subscript i, ranging from start to nterm, (for the number of terms).  These are set at 1 and 286.   The program works OK with these values, but if the variable start is changed to zero, 0, it doesn't work.  I thought I might have a division by zero, but can't find one.  I also drew a circle with a radius of zero - no problem!  (...except it's difficult to see:-))   

   My main puzzle is why does it come up with the error message "invalid subscript selector" when the variable start is set to 0?

With i=start=0 I am asking it to draw a circle of radius zero at some specified coords - but it doesn't like it!  

  Any comments would be appreciated.  Merry Christmas.

David

 

 

restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Pappus Chain of circles

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

with(plots):

with(plottools):

#Maple 7

#r is ratio of AC/AB = diam of large circle, to a smaller internally tangential one

r:=1.35:

#Why will start=0 not work?

start:=1:

#nterm=286 is smallest value where axes have "true" origin of (0.0)

#nterm<= 285 puts "x-axis" below y=-0.6

nterm:=286:

X := [seq( 0.5*r*(1+r)/(((i*(1-r))^2)+r), i=start..nterm )]:

 

Y := [seq( i*r*(1-r)/(((i*(1-r))^2)+r), i=start..nterm )]:

rad:=[seq(0.5*r*(1-r)/((i*(1-r))^2+r), i=start..nterm)]:

[seq( i, i=0..-infinity )];  #???  why the -?

#Gives [] output with -ve sign:  empty list?  Why is 0 not included?

# Not allowed to use with seq

#ccc:=[seq(circle([X[i],Y[i]],rad[i]), i=1..5)]:  #nops(X))]:

ccc:=[seq(circle([X[i],Y[i]],rad[i]), i=start..nterm)]:

#c := circle([1,1], 0, color=red):

#plots[display](c, scaling=constrained);

plots[display](ccc, scaling=constrained);

 

OUTPUT

 

Hello

Long time asker of minimization problems here.

Following on from my question on 2D packing.

I found this "solved" problem for packing 3D items efficiently. See Illustration 6.13

https://www.researchgate.net/file.PostFileLoader.html?id=59938b635b49527571134c33&assetKey=AS%3A527790252490752%401502846410852

Some discrepancies with constraint set-up (first one), number of variables and the optimized solution.

3DbinPack2.mw

 

Hello

When I export a worksheet table as HTML,MATH EXPRESSIONS: GIF the resulting .html file is 100% readable.

screenshot:

But when i send the html file to myself over email, I get gibberish

The (acer) code for the top is... .....Equation(Standings[id]:-mu &+- Standings[id]:-sigma....

and below opponents rating: ....Cell(Equation(thetable[id][':-losses'][r][1] &+- thetable[id][':-losses'][r][2],......

Anyone shed?

Does any body have example of maple code for solving optimal control problem in deterministic model using Pontryagin's maximum (or minimum) principle?

First 107 108 109 110 111 112 113 Last Page 109 of 2097