Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I have a big matrix which is computed in a worksheet, now I have to use this matrix in another worksheet. Could you recommend some ways of healthy transferring of quantities between worksheets?

with(plots);
with(LinearAlgebra);
A := Matrix([[2, 1, 0, 0, 3], [0, 2, 1, 0, 0], [0, 0, 2, 1, 0], [0, 0, 0, 2, 1], [0, 0, 0, 0, 2]]);
sparsematrixplot(A, matrixview, color = "Red", symbol = "cross");

How do I change the plot to show other symbols? Even though I write for example "cross" I still get the default box.

Also, is there a way in which I can let the color depend on the number in the matrix? Right now it just shows all non-zero entries.

restart:
digits := 20;
unprotect(D);
G := 0.04361098108*x^2 + 0.4810001561*x*y + 1.326278064*y^2 - 0.7320831383*x - 2.656083763*y + 1 = 0
f := (x, y) -> lhs(G);
coeffs(f(x, y));
A, B, C, D, E, F := coeffs(f(x, y));
A := coeff(f(x, y), x, 2);
B := coeff(coeff(f(x, y), x), y);
C := coeff(f(x, y), y, 2);
D := coeff(coeff(f(x, y), x, 1), y, 0);
E := coeff(coeff(f(x, y), y, 1), x, 0);
F := tcoeff(f(x, y));
expand(B^2 - ((4*A) . C));
                          digits := 20

   f := proc (x, y) options operator, arrow; lhs(G) end proc

  1, -0.7320831383, 1.326278064, 0.04361098108, 0.4810001561, 

    -2.656083763


A, B, C, D, E, F := 1, -0.7320831383, 1.326278064, 0.04361098108, 

  0.4810001561, -2.656083763


                       A := 0.04361098108

                       B := 0.4810001561

                        C := 1.326278064

                       D := -0.7320831383

                       E := -2.656083763

                             F := 1

                               0.


with(geometry):
_EnvHorizontalName := 'x': _EnvVerticalName := 'y':
conic(co,f(x,y),[x,y]):
detail(co);
                 /                            
   GeometryDetail\["name of the object", co], 
   ["form of the object", ellipse2d], 
   ["center", [1.212351672 ^(10, 10), -2.198412833 ^(10, 9)]], 
   ["foci", [[2.424703344 ^(10, 10), -4.396825668 ^(10, 9)], 
   [0.1787052775, 0.9855002601]]], 
   ["length of the major axis", 2.464245740 ^(10, 10)], 
   ["length of the minor axis", 66579.62094], 
   [                                               2
   ["equation of the ellipse", 1. + 0.04361098108 x 
                                      2                 
    + 0.4810001561 x y + 1.326278064 y  - 0.7320831383 x
                       ]\ 
    - 2.656083763 y = 0]/;
   "_noterminate";

G is a parabola with B^2-4*A*C=0 or an ellipse ? A =1 or F=1 ? Thank you for youy answer. 

I need the Infinitesimals(Lie group analysis) of the system of PDE. I have attached below the system of PDE in MAPLE given below.MAPLE_Help.mw

Thank you

I have code which in module which does this

           DEtools:-kovacicsols(ode,func)

Where ode is some ode and func is y(x).  When I step in the debugger, I get exception at this. It says

       DBG> DEtools:-kovacicsols(ode,func)
       Error, `DEtools` does not evaluate to a module

Same exact code works OK from worksheet as expected.   SO for some reason, inside this module it does not see DEtools and I have no idea why.

Then I tried with :-  before DEtools, but this did not help. it gives

DBG> :-DEtools:-kovacicsols(ode,func)
Error, `table([(dperiodic_sols)=proc () `DEtools/init`() <> 0; `ODEtools/intfactor`(_passed); end etc...
` does not evaluate to a module

In a worksheet, it all works OK

ode:=diff(diff(y(x),x),x) = (-3/16/x^2-2/9/(x-1)^2+3/16/x/(x-1))*y(x);
func:=y(x);
DEtools:-kovacicsols(ode,func)

Gives the solution with no error.

Any suggestion what could be the cause and what to try next? I never seen anything like this. I am running this code using 

interface(warnlevel=4);
kernelopts('assertlevel'=2):

I am able to make a MWE. It seems this always happens in the debugger.  But if  I let it run, it works somehow. Only when I try to step into it, it gives error. Here is MWE

interface(warnlevel=4);
kernelopts('assertlevel'=2):
foo:=proc(ode,func)
   local result;
    DEBUG();   
    result:=DEtools:-kovacicsols(ode,func);
    return result;
  end proc;

And now

ode:=diff(diff(y(x),x),x) = (-3/16/x^2-2/9/(x-1)^2+3/16/x/(x-1))*y(x);
func:=y(x);
foo(ode,y(x))

Now in the debugger if I do DEtools:-kovacicsols(ode,func) or if I stepin the call, I get the error. But I hit the continue botton, I do not get the error and it gives solution. 

Why this happens?

Maple 2021.2 on windows 10

@acer,
In the past, you had shown how to use take a given sparse A matrix and store the LU components and use the same factorization for multiple backsolves at https://www.mapleprimes.com/posts/41191-Solving-Sparse-Linear-Systems-In-Maple#comment200817

When PDEs are solved, we are calling the A matrix at every time step (with some discretizations in x) and the factorization is done and stored at every time step (this is time-consuming and memory-consuming). Is it possible to call UMFPACK using only the sparse storage and entries? The main routine seems to provide the option 

https://people.sc.fsu.edu/~jburkardt/f77_src/umfpack/umfpack.html

This would mean that the pattern is found only once for the Jacobian at t= 0, then only the non-zero sparse entries (vector/row, not a matrix) are updated at every time step.

To be clear, what I am asking for is create a random sparse matrix (say 4x4 or 10x10)
create a b Vector.

Solve AZ =b with method = SparseDirect. (This should internally create and store R, CC, X as at https://people.sc.fsu.edu/~jburkardt/f77_src/umfpack/umfpack.html)

Store R, CC, X and update only X for a different A matrix with the same sparsity pattern and solve for Z using stored (R, CC), and updated X.

j'ai deux spheres concentriques s1 et s2  de centre O(-1,-1,-1) de rayon respectivement 3 et 2. mais maple donne que FindAngle(s1,s2)=arcos(31/12). comment expliquez ceçi et merci beaucoup.

PDETWOSTEPVARIAMETHOD.mwPDETWOSTEPVARIAMETHOD.mw

Pls i need help to correct this iteration code, I wrote but is not given the correct answer. find attached the worksheet

Hi again everybody,
I hope this can help in some classrooms.

This procedure has some warnings.  Someone else can clean it up.
Also, the ithprime() command can make it a bit slicker.
I did work with prime constelations project, and you can see my web page at mattanderson.fun  .

Refference oeis.org/A40 .
Some prime constelations, and k-tuples, are not of 'general intrest' yet, so they are not in the OEIS encyclopedia YET!

But prime numbers are exciting.  I like doing calculations.

Hopefully someone in the next generation will take up an intrest and do what I did.

pairs_procedure.mw

pairs_procedure.pdf

I wish the best on all of you.

Regards,

Matt C. Anderson

which kind of input is DeepLearning:-Optimizer(GradientDescent()) suppose to take? Nummeric value or function?

Hi!

I am fairly new to maple and needing to use it for my project this year. I have been advised to use it to help solve the following integral:

int(2/(1-x^p)^(1/p), x=0..1)

It will give me the answer I am looking for, however I cannot get it to explain the steps to get the answer. I have tried Student Calculus1 and ShowSolution but neither of them seem to be working.

Any help would be really appreiacted!

Hello Sir
Hope you are fine. I am facing issues in integration evaluations. I have attched code and pic as well. Kindly guide me. I am waiting for your kind response.
Thanks

question.mw

restart; printlevel := 4; kernelopts(version)

{--> enter Terminate, args =

<-- exit Terminate (now at top level) = }
{--> enter ModuleUnload, args =
<-- exit ModuleUnload (now at top level) = }
{--> enter OnUnload, args =
<-- exit OnUnload (now at top level) = }

 

`Maple 2015.0, X86 64 WINDOWS, Feb 17 2015, Build ID 1022128`

(1)

with(LinearAlgebra):

L[time] := 1:

ff11 := cos(1.0*k*(p+q+x+t)):

NULL

JJx11 := QQ*(int(int(p*ff11/`&gamma;&gamma;Exact`, p), q))/m;

175631174533.479692645444566411*(int(int(0.273299999999999999999999999999e-21*p*cos(.50*p+.50*q+.50*x+.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2), p), q))

(2)

evalf(IntegrationTools:-Expand(%));

Warning,  computation interrupted

 

``

``

int(int(p*ff11/`&gamma;&gamma;Exact`, p = 0 .. 1), q = 0 .. 1); evalf(IntegrationTools:-Expand(%))

int(int(0.273299999999999999999999999999e-21*p*cos(.50*p+.50*q+.50*x+.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2), p = 0 .. 1), q = 0 .. 1)

 

0.273299999999999999999999999999e-21*(Int(Int(p*cos(.50*p)*cos(.50*q)*cos(.50*x)*cos(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2)-1.*p*cos(.50*p)*cos(.50*q)*sin(.50*x)*sin(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2)-1.*p*cos(.50*p)*sin(.50*q)*sin(.50*x)*cos(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2)-1.*p*cos(.50*p)*sin(.50*q)*cos(.50*x)*sin(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2)-1.*p*sin(.50*p)*sin(.50*q)*cos(.50*x)*cos(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2)+p*sin(.50*p)*sin(.50*q)*sin(.50*x)*sin(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2)-1.*p*sin(.50*p)*cos(.50*q)*sin(.50*x)*cos(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2)-1.*p*sin(.50*p)*cos(.50*q)*cos(.50*x)*sin(.50*t)/(p^2+q^2+0.746928900000000000000000000000e-43)^(1/2), p = 0. .. 1.), q = 0. .. 1.))

(3)

``

Download question.mw

i use dslove command to solve system of differential equations but got an error, i checked the error but i don't know where i went wrong, please help me!

error: Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

HOI.mw

In Maple what is the fastest way to convert a directed line segment into a vector? Please help me. Thank you a lot.

I have an assignment for my class but I don't know how to get the answer without getting an error. Maple_2.mw
 

Vector Valued Functions

and

Level Sets of Scalar Valued Functions

 

This worksheet is meant to give you some tools that you can use to

explore vector valued functions and scalar valued functions of several variables.

We will use the Student[VectorCalculus]  and the plots  packages.

 

First we load the packages with a restart at the beginning.  That is

meant to make it easier to check what happens when you run your

solutions.

 

restart;
with(Student:-VectorCalculus);
BasisFormat(false):
with(plots):
with(plottools):

Deivatives and integrals for vector valued functions

   

Plotting velocity and acceleration along a curve

   

Plotting functions of two variables and contours.

   

Exercises

   


 

Download Maple_2.mw

 

First 213 214 215 216 217 218 219 Last Page 215 of 2097