Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

Hello Everyone,

Firstly thank you for your help everyone with answering my other question yesterday, it really helped.
Today I present with yet another issue, which is dealing with solving differential equations using the dsolve-command.

I have written a script which is defining the differential equations, (some numbers), and the constraints. However when I let it solve using dsolve, I only get a very very trivial answer, meaning f(x) = 0.
of course this is a valid answer, but not one I can work with... 
(Can I maybe give an additional information, e.g. the function type it is supposed to do this task? In the documentation there is information on setting it up as a series, but what about exponential equations?)

I have uploaded to script (very short), maybe someone knows where I went wrong?
Also, I am assuming that for solving a DE which involves a fourth order derivative I need exactly four boundary conditions, which I provided.
Things are also getting really wonky when I set Nxy to something non-zero... Then I get a solutions which involves a mysterious Z which never happened before and again all four C_x, which I assume resemble missing boundary conditions, reappear.

Any help would be fantastic! :)

Best Regards,

Lennart
 

``

 

restart*with(DocumentTools); with(LinearAlgebra); D11 := 10000; D12 := 10000; D22 := 10000; D66 := 10000; Nx := 1000; Ny := 1000; Nxy := 0; a := 5000; b := 5000; w := sin(y)*GenFunc(x); PDGL := D11*(diff(w, `$`(x, 4)))+(2*(D12+2*D66))*(diff(w, `$`(x, 2), `$`(y, 2)))+D22*(diff(w, `$`(y, 4)))+Nx*(diff(w, `$`(x, 2)))+Ny*(diff(w, `$`(y, 2)))+2*Nxy*(diff(w, `$`(x, 1), `$`(y, 1))) = 0; RB := GenFunc(0) = 0, (D(GenFunc))(0) = 0, GenFunc(a) = 0, (D(GenFunc))(a) = 0; dsolve({PDGL, RB}, GenFunc(x))

GenFunc(x) = 0

(1)

NULL


 

Download Test_DGL1.mw

Hello Everyone,

I am fairly new with Maple, but I am slowly getting the hang of it.

For a university project I need to be able to create a form where a user can input a matrix manually.
Also, I need to have something like a ComboBox where I can input how many rows that matrix will need. (1-20 or so)

I have solved the latter part by adding a "When Use"-Code that sets my Array/Matrix of the DataTable to be a Zero Matrix with the correct dimensions in accordance with the value chosen in the ComboBox.
(This is for a composite calculation, the ComboBox gives the number of plies, the matrix defines the ply orientation)

I then expected that the ZeroMatrix would serve as the baseline and the user can then manually edit the Matrix to be the correct values manually, but this gives me the error message that the DataTable cannot be edited.
I suspect the ZeroMatrix is now the "Master", because I defined it via Code.

Working with "visibleRows" did not help, because it does not change the matrix size only the size of DataTable and the user can still scroll down.

What I need is that I have a fully editable DataTable with exactly the number of rows that I specified using the ComboBox.

Does anyone of you perhaps have an idea what I could do to achieve this?
Any help would be fantastic! :)

Best Regards,
Lennart

Hello everyone

I am trying to plot some vectors that have both numeric entries and NA. The vectors represent the root of some function depending on certain parameters (NA means that there is no root for these parameters) and I want to represent the value of the root (vertical) vs the vector that store the variable parameter (horizontal) omitting the values that yield NA. Is there a fast way to do that?

 

Thank you so much in advance

hi

i have expression like

z:=f0(x) + f1(x)*diff(y(x),x) + f2(x)*diff(y(x),x,x) + f4(x)*diff(y(x),x,x,x,x) ... etc ;

always linear terms diff((y(x),x) etc, never like diff((y(x),x)^2

want vector with coeffs of diff((y(x),x) etc in order low to high so want

<f1(x), f2(x), 0, f4(x) ...>

if z:=f0(x) + f2(x)*diff(y(x),x,x) + f4(x)*diff(y(x),x,x,x,x) ... etc ; want <0, f2(x), 0, f4(x) ...>

first term in vector always for diff((y(x),x)

how to do thanks

 

 

 

 

Any could you please help me to write program using for loop of 

U(0, h, m)=0 for h=1 .. 10, m=0..10.?

Hello everyone,

I am trying to represent a set of data using the errorplot command as follows

plotlims50 := ErrorPlot(xcoords = vectorl, sigmasl50, yerrors = [0.1e-1, 0.4e-1, 0.1e-1, 0.3e-1, 0.3e-1, 0.6e-1, 0.6e-1, 0.1e-1, 0.4e-1, 0.6e-1, 0.5e-1, 0.3e-1, 0.2e-1, 0.2e-1], color = "green")

I guess it's okey, but I would like to have that kind of small lines at the end of the bar and perpendicular to it (like in the image below). Is it possible?

Thank you so much in advance

Hi,

I'm working on a procedure involving conic equations such as follows... 

Conic:=a*x^2+2*h*x*y+b*y^2+2*f*x+2*g*y+c;

and I have a file filled with values in order of the variables I want them assigned to.

e.g 2,-6,3,0,0

I'm only looking for the specific command I need for maple to link the two.

Any help would be greatly apreciated.

Hello everyone,


I'm trying to generate plots in Maple so that I can export the image and be easily read in a document. I usually use the plots [display] command as I often reuse "subplots". The main problem appears when entering a legend, as it disrupts the proportions and I have to rescale everything manually. In doing so I sometimes get small, hard-to-read images or captions. Is there any way to resize the image and caption other than manually? Even better, is there a way to scale both to a certain image size and to make the caption legible at that size (e.g. image 7 cm wide and font equivalent to 10 pt in Word)?

Thank you so much in advance

Hi, I'm having trouble setting up a procedure for an assignment, we're trying to find root mean square error and remove variable by variable to find the best line of fit etc etc... hopefully from the coding you can see what I'm am trying to do, but I don't understand why it is not working? I wonder if it has something to do with the X and Y being read in?
 
M:=readdata("C:\\Users\\bjense04.CSUMAIN.001\\Documents\\ass1Q2.txt",[float,float,float,float,float]):
convert(M,matrix):
with(LinearAlgebra):
n:=RowDimension(convert(M,matrix));
X:=convert(M[1..n,1..4],matrix):
Y:=convert(M[1..n,5..5],vector):
with(Statistics):
FullEQN:=LinearFit([1,a,b,c,d],X,Y,[a,b,c,d]);
#the next part is incomplete
rmse_mlr:=proc(Full)
local i, sq, n, predicted;
sq:=0:
for i from 1 to n do
 predicted:=subs([a=X[i,1],b=X[i,2],c=X[i,3],d=X[i,4]],Full);
 sq:=sq+(Y[i]-predicted)^2;
end do:
return sqrt(sq/n);
end proc;
 
 
I then test the procedure with 
rmse_mlr(FullEQN,X,Y);
 
and the response i get is

Error, (in rmse_mlr) final value in for loop must be numeric or character
 
help?

I can't figure out how to write a program to work out the classification of a conic and if it is a degenerate given a data file.

So far I have programed the following which reads the conic coefficients (a,h,b,f,g,c) and displays it as an equation: 

conic :=proc(a,h,b,f,g,c)
local C;
C:= a*x^2+h*x*y+b*y^2+f*x+g*y+c=0;
end proc:

Can anyone help me work this out

Hi I have product of function Q along with its derivative.  

Q'j(x)*Qi(x) for j=0,1 and i=0,...n.

how can i make loop  to collect all coefficeints for this function for j=0,1 and i=0,1,..n.

i hope some one will help me.

Thanks

Hi Everyone, So i have a pretty ugly function which i am interesting in plotting. When i plot it seems that all values are real however when i do evalf with specific values of variable i am plotting over it shows that it is complex. Any thoughts on how to get it to stop plotting once it becomes complex? See attached maple file.

ComplexPlotQuestion.mw

Thanks. 

I am trying to count of the number of primes p such that when p is concatenated with 1 (ie p1, or 10*p+1),  if p1 is composite then we record the result 1, else  2. This gives the minimum k for which the concatenation pk is composite, and k is always either 1 or 2. It would be interesting to compare the number of primes with 1 and those with 2 up to a given max. I have already written a code which calculates the 1 or 2 for each prime but have not managed to adapt it keep count.
 

I would like to have a code to keep a count  of the 1s and 2s, thus being able to say that up to 10^k we see {a, b} where a is the number of primes with "1" and b is the number with "2".

Ideally I would like to be able to output plots of these data for any k =1,2,3,... up to a pre declared maximum k value, so as to make comparative graphs. I do not know how to organise the counting process, or if it is possible to get Maple to do the plots as well. Can anyone please assist me with this? I have Maple 2017.

Best regards,

David.

 

Hi,

Maple 2017.3 has these problems which hamper my work with it. I shown three examples.

Example 1: Maple cannot recognize automatically that two complex numbers are equal:

[>eq1:=9*exp((1/9)*(5*I)*Pi)-9*exp((1/9)*(2*I)*Pi) = -8*exp((1/9)*(2*I)*Pi)+7*exp((1/9)*(5*I)*Pi)+exp((1/18)*(13*I)*Pi)*sqrt(3);

Here, lhs(eq1) and rhs(eq1) are in fact equal. Yes, evela(simplify(lhs(eq1)-rhs(eq1)) reduces to zero but not when solving equations (see Example 2).

Example 2:

[>sys1:=[_xx[1]+lhs(eq1),_xx[1]+rhs(eq1)];
[>solve(sys1,[_xx[1],_xx[2]]);

yields no answer.

Example 3:

[>alias(omega=RootOf(_Z^2+_Z+1));
[>rt:=(-1+I*sqrt(3))/2;

Maple fails to substitute the alias and recognize that rt=omega.

Any suggestion on a work-around problems 2 and 3 would be helpful.

Thanks,

Rafal Ablamowicz
www.math.tntech.edu/rafal/


 

Hi everyone, I hope you are staying safe from coronavirus.

I have a table of data points in excel (attached file) and want to plot a smooth surface plot in Maple, the plot will look like in the image below. How can I do it in Maple (2017)? I tried matrixplot(matrix) and the surface is good. However, I couldn't change the X, Y axes value since it should be the default value. 

Thank you very much.PlotTest.xlsx

1 2 3 4 5 6 7 Last Page 1 of 38