<

Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

mint gives messages such as

 These local variables were assigned a value, but otherwise unused:  i

even though it does say what proc this is in, it does not give the line number where such problem is at.

So if a proc is long, say 100 or 200 lines, it is very hard to find the location of such things visually all the time.  Searching for "i" is not too useful.

Tried different options but there are no line numbers given for these messages.

"C:\Program Files\Maple 2022\bin.X86_64_WINDOWS\mint.exe" -i 2  foo.mpl

Using  -i 4 gives much more information, but no line numbers.

Are there other things to try? I think mint should be improved and list line number for each warning and message such as also These local variables were assigned a value, but otherwise unused: 

It should give lines numbers where this happened to make it easier to locate in the editor.

Maple 2022.1 windows 10.

 

Assalomu alaykum. 

I couldn't solve this integral equation but other online calculator done it. How to calculate in Maple. I use Maple 2021.

L[1, 0] := t + Pi*t/2 + (4*t^(3/2))/3;
L[2, 0] := t^(1/2) + Pi*t/4;
L := int((L[1, 0] + L[2, 0])/(x - t)^(1/2), t = 0 .. x);
 

Is it possible to integrate eq (1) in such a way that the final result will be of 1st order differential equation? 

 


 

restart

with(PDEtools)

eq := (diff(U(z), z))^3*(diff(U(z), z, z))+(diff(U(z), z))*(diff(U(z), z, z, z, z))-(diff(U(z), z, z))*(diff(U(z), z, z, z)) = 0

(diff(U(z), z))^3*(diff(diff(U(z), z), z))+(diff(U(z), z))*(diff(diff(diff(diff(U(z), z), z), z), z))-(diff(diff(U(z), z), z))*(diff(diff(diff(U(z), z), z), z)) = 0

(1)

eq1 := map(convert, eq, diff); eq2 := map(int, lhs(eq1), z)-C1 = 0

(diff(U(z), z))^3*(diff(diff(U(z), z), z))+(diff(U(z), z))*(diff(diff(diff(diff(U(z), z), z), z), z))-(diff(diff(U(z), z), z))*(diff(diff(diff(U(z), z), z), z)) = 0

 

(1/4)*(diff(U(z), z))^4-(diff(diff(U(z), z), z))^2+(diff(diff(diff(U(z), z), z), z))*(diff(U(z), z))-C1 = 0

(2)

``


 

Download inttegration.mw

Hello everybody,

Something totaly unexpected came by, and i was wondering: how could this be? Im putting what would be the same input in, and yet, its not giving me the results i was expecting for the input i had itterated. 

While one solution would be really cumbersome and slow, it tried to do it faster. It worked before, but now i hit a wall. No clue why, but it seems to be so. 

Here is the example:

 

restart

stelsel := {-x1+7*x2+3*x-x5 = -7, 2*x1+3*x2+4*x3-x5 = 10, 5*x1-3*x2+2*x3-x4-2*x5 = 8}

{-x1+7*x2+3*x-x5 = -7, 2*x1+3*x2+4*x3-x5 = 10, 5*x1-3*x2+2*x3-x4-2*x5 = 8}

(1)

solve(stelsel*{x1, x2, x3, x4, x5})

Error, (in testeq) invalid arguments

 

restart

stelsel := {-x[1]+7*x[2]+x[3]-x[5] = -7, 2*x[1]+3*x[2]+4*x[3]-x[5] = 10, 5*x[1]-3*x[2]+2*x[3]-x[4]-2*x[5] = 8}

{-x[1]+7*x[2]+x[3]-x[5] = -7, 2*x[1]+3*x[2]+4*x[3]-x[5] = 10, 5*x[1]-3*x[2]+2*x[3]-x[4]-2*x[5] = 8}

(2)

solve(stelsel, {x[1], x[2], x[3], x[4], x[5]})

{x[1] = 17/3+(4/3)*x[2]-x[3], x[2] = x[2], x[3] = x[3], x[4] = 53/3-(23/3)*x[2]-7*x[3], x[5] = 4/3+(17/3)*x[2]+2*x[3]}

(3)

``

Thank you!

Greetings,

The Function

Download Mapleprimes_Question_Book_2_Paragraph_4.2.2.mw

How can one ask Maple 2022 to give the non-trivial solution to this differential equation 

V’(t)=-2*V(t)^(2/3) with V(5)=0 ?? 

Have tried dsolve({V’(t)=-2*V(t)^(2/3),V(5)=0}). But that only gives me the trivial solution V(t)=0.

The wikipedia website below contains a general description of Doyle spirals but not the full mathematics of their construction.  

https://en.wikipedia.org/wiki/Doyle_spiral

The website below apparently contains the html coding for an animated display of Doyle spirals, but I am not familiar with this coding language.

https://bl.ocks.org/robinhouston/6096950

Can anyone direct me to 1) the complete mathematics describing the construction of a Doyle spiral and/or

                                        2) a Maple worksheet which codes for the display of a Doyle spiral?

Do you think the following messages  by mint should have been the same? this is just some made up example with no purpose other than to show the messages.

foo:=proc(x)
local z,a:=1,la;
   patmatch(x,a*x,'la');   
   map(z->assign(z),la);
end proc;

boo:=proc(y,x)
local Z,RHS;   
   RHS:=y(x);
   subs(y(x)=Z,RHS);
end proc;

Looking at the above, foo() has z used but never assigned a value, right?  And in boo(), Z is used but never assigned a value.

but mint gives slighlty different message

"C:\Program Files\Maple 2022\bin.X86_64_WINDOWS\mint.exe" -i 2  A.mpl

Procedure foo( x ) on lines 2 to 6
  These local variables were never used:  z

Procedure boo( y, x ) on lines 8 to 12
  These local variables were used but never assigned a value:  Z

Should not these two messages have been the same?

Recent documents shows the last 10 files you've opened.  Any way to increase that to something like 20 or 50?

Dear everyone,

Ive been looking at this problem ive got, but i cant find out what would make it work. I can put numbers in a matrix, i can solve 3 unknowns with 3 equations. But now there is a variable, and the variable causes the solution to give either: 1 solution, no solution, or more than one solution. 

I can "brush the matrix" as they say it in Dutch, but im learning Maple so it can go a lot faster than manual labor. So is there a way to do it with Maple? 

Figure 4.1 gives from left to right: 1 solution, no solution, and an indefinite amount of solutions.

Questions: For what value of p, a. gives 1 solution? b. gives no solution? c. gives more than 1 solution?

Now i got Maple to tell me how much p x1, x2, and x3 was, but its not bringing me anywhere to where i can get to a solution. 

A manual method is given in this example. Manual is way way to slow for what i need to achieve, ive got some large big books with mechanics, dynamics, statics, fluid mechanics, concrete calcutions, chemistry etc. waiting for me. I can never achieve that manually in the same time as i could do it with maple. :S 

#example of how to do a solve of a matrix with 3 variables:

stelsel := {x1+x2+x3 = 4, 3*x1+x2-5*x3 = -10, 3*x1+2*x2-x3 = 1}

{x1+x2+x3 = 4, 3*x1+x2-5*x3 = -10, 3*x1+2*x2-x3 = 1}

(1)

solve(stelsel, {x1, x2, x3})

{x1 = -7+3*x3, x2 = 11-4*x3, x3 = x3}

(2)

#now the example number 15

stelsel := {(2-p)*x2+x3 = 2, -x1+2*x2+(2-p)*x3 = 0, (1-p)*x1+2*x2+2*x3 = p+3}

{(2-p)*x2+x3 = 2, -x1+2*x2+(2-p)*x3 = 0, (1-p)*x1+2*x2+2*x3 = p+3}

(3)

solve(stelsel, {x1, x2, x3})

{x1 = -(p^2-6)/(p^2-4*p+4), x2 = -(2*p-5)/(p^2-4*p+4), x3 = 1/(-2+p)}

(4)

``

Thank you!

Greetings,

The Function

Download Mapleprimes_Question_Book_2_Paragraph_4.2_Example_15.mw

Hello.

If I input 'floor(5.5)' in Maple 2018 I get the expected \lfloor 5.5 \rfloor thing.  I mean, with the special brackets typical for the floor notation.

However, if I try to place the floor notation onto a plot I get literally the string "floor(5.5)".  As in

  textplot([2, 2, 'floor(5.5)'])

The ' ' quotation marks ensure the delayed evaluation but I do not get the floor parentheses! 

Interestingly,

  textplot([2, 2, 'sqrt(5.5)'])

outputs the radical notation as expected.

How come I cannot produce a plot with the floor brackets notation in it?

Thanks

Minko

When running mint on a single .mpl file, I often get this warning

These names were used as global names but were not declared:  main_module

When having this code in the mpl file

o:=Object(main_module:-person_type);

The problem is that main_module is a module that lives in separate mpl file.

It is a differerent module in its own ,mpl file which inside it contains the person_type definition. (another module of type object)

I know I can ignore this. And have been. But my question is: how does one "declare" main_module inside this mpl file to avoid getting this warning message? Since main_module is its own module in separate file. I do not understand what does it mean to  "declare" it.

Here is the full code

A:=module()
   export boo:=proc()
      local o;
      o:=Object(main_module:-person_type);
      o:-foo();
   end proc;
end module;

And here is the command I used

"C:\Program Files\Maple 2022\bin.X86_64_WINDOWS\mint.exe" -i 2 A.mpl

Gives

Nested Procedure boo() on lines 2 to 6
  These names were used as global names but were not declared:  main_module

Later on, when I build my .mla library, all these modules are put inside the library. So it is not an issue when running the code, but I'd like to see if it is possible to add something to A.mpl to tell Maple that main_module is separate module and not to worry about it.

 

 This interactive electronic textbook, in the form of Maple worksheets, is released in its sixth edition, 2021 August.  This book has two major divisions, mathematics for chemistry -- the mathematics that any instructor of a course in chemistry would wish a student thereof to understand and to be able to implement, and mathematics of chemistry, in the sense of the classic volumes by Margenau and Murphy -- mathematical treatments of particular topics in chemistry from an introductory post-secondary level to a post-graduate level. The content, which includes not only chapters in previous editions that have been revised but also additional chapters on quantum mechanics, molecular spectrometry and advanced chemical kinetics, has been collected during two decades, with many contributions from other authors, acknowledged in particular locations.  Each chapter includes not only explanatory treatments but also illuminating examples and exercises with chemical applications where practicable.

 

Mathematics for chemistry      0  introduction to Maple commands

                                                 1  numbers, symbols and elementary functions

                                                 2  plotting, geometry, trigonometry and functions

                                                 3  differential calculus

                                                 4  integral calculus

                                                 5  multivariate calculus

                                                 6  linear algebra

                                                 7  differential and integral equations

                                                 8  probability, statistics, regression and optimisation

Mathematics of chemistry       9  chemical equilibrium

                                                10  group theory

                                                11  graph theory

                                                12  quantum mechanics in three parts -- models, atoms and molecules

                                                13  molecular spectrometry

                                                14  Fourier transforms

                                                15  advanced chemical kinetics

                                                16  dielectric and magnetic properties

The content freely available at https://www.maplesoft.com/applications/view.aspx?SID=154267 includes also a published report on teaching mathematics with symbolic software and an interactive periodic chart that yields information about particular chemical elements and their isotopic variants.

            The nature of this electronic interactive textbook makes it applicable with an instructor in a traditional setting, or computer laboratory, for which the material of mathematics for chemistry could be reasonably covered in three or four semesters, but even for self study.  The chapters on quantum mechanics and Fourier transforms are available as separate textbooks in the same format.

Hi,

How to keep the log function displayed in base b in my table, not its converted form in ln  ( f3 and f4 in my file) ?

Thanks.

DisplayLogQCM.mw

I have started to use CodeGeneration[C] instead of codegen[C] (depreciated). In the attached example not all variables and parameters of a C function are declared as double, although the default value is double.

If this is by design:

How can I force double without going back to codegen[C] or manual declaration of each item?

C_code_generation_with_CodeGeneration.mw

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