Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi Guys,

It might be a very basic question, but I am struggling with it for a quite a time.  I have an expression in a form of

f(x)=h(x)+g(x);

and I want to use factor operation elementwise, i.e., it can individually act on h(x) and can give me

f(x)=h1(x)*h2(x)+g1(x)*g2(x). But whenever I am putting factor operation with elementwise it is not giving me desired answer. It would be really helpful and great if someone can help me out.

I am attaching maple sheet for reference also.

Thanks in advance and regards

Sunit.
example.mw
Download example.mw

 

`assuming`([dsolve({a3(0) = 0, diff(a3(z), z) = -K*a10*a20*sqrt(1-a3(z)^2/a10^2)*sqrt(1-a3(z)^2/a20^2)})], [positive])

which returns

a3(z) = -JacobiSN(z*a10*K, a20/a10)*a20

While in Mathematica, it yields a different solution:

a3(z) = -JacobiSN(z*a10*K, a20^2/a10^2)*a20

Which is right?

Thanks in advance.

Hi,

Consider the following planar dynamical system(PDS) with parameters r, p1, s, n:
a:=(r+1)*(1+p1*s)/(2*(1-P1))-1/(n^2);
b:=(r+1)*(3-r)*(1-p1*s^2)/(8*(1-p1))-3/(2*n^4);
c:=(r+1)*(3-r)*(5-3*r)*(1+p1*s^3)/(48*(1-p1))-5/(2*n^6);
 

 

I'm using Maple to solve academic problems.
At a certain stage, I need a loop to perform numerical calculations, from where I extract a graph. However, each step takes a long time and therefore, I would like to evaluate the performance of the result at each step of time.
To simulate my calculation, I created a test code:

restart:                                                                  # Restart
with(Threads):                                                      # To use Sleep()
a := 2*((ceil(rand()/10^10)-50)*(1/10)):                # Random Value
b := 2*(ceil(rand()/10^10)-50):                             # Random Value
c := 2*ceil(rand()/10^10)-100:                             # Random Value
f := proc (x) options operator, arrow; a*x^2+b*x+c end proc;                  # Generic function that i'm ploting.
np := 10:                                                              # Number of Points i'm ploting
vmax := 10:                                                         # Maximum funcxtion value
VAR1 := Matrix(np+1, 2, proc (m, n) options operator, arrow; if n = 1 then (m-1)*vmax/np else 0 end if end proc):       # Declaring VAR1 as a "null" matrix

for i to np+1 do                                                  # Loop Start
VAR1[i, 2] := f((i-1)*vmax/np):                           # VAR1 value update
print(plot([VAR1], x = 0 .. vmax,  gridlines)):                           # Ploting VAR1
Sleep(.25):                                                         # Simulating longer processing time
od;

 

However, all graphs are displayed simultaneously after the last step of the for loop.
I would like to print the result (output) after each time step, plotting a new graph for each time an iteration ends.
Would anyone know how to do this?


Thank you for your help.

 

Hi,

fsolve( [Eq1, Eq2, Eq3, Eq4], {x, y}) is not possible since the number of variables are less than number of equations. Are there other ways to solve simultaneous equations?

 

Thanks,

Baharm31

 

Hi,

I am looking for an animation on conics according to the eccentricity? ideas?

Thanks

 

 How to use the command  "latex" to write a table with, say,

3 polynomials on the same line, separated by an "&" ?

 

The idea is to get  a program to produce tables of polynomials in LATEX format.

Hi all;

I hope all is well with you.

I am regular user of Maple for 7 years. I just reinstalled it to a new version, Maple 2019.

After installation, which was very smooth and without any unexpected problem, I opened a new document and entered a simple task; “sqrt(4);” the answer was

1.81847767202745*10^(-58) + (7.53238114626421*10^(-59))*I

I am pretty sure that I am missing something. The answer is obviously incorrect and there is a problem, but where.

I would be thankful if someone could help me with this issue.

Best

Farzad

 

A tank contains 1200 gal of water in which 150 lb of salt is dissolved initially. 50 gal of brine, each (gallon) containing (1+sint) lb of dissolved salt, runs into the tank per minute. The mixture, which is kept uniform by stirring, runs out of the tank at the rate of 30 gal per minute. Denoting the amount of salt in the tank at any time i as m, (a) formulate an ordinary differential equation for studying the dynamics of the amount of salt in the tank, (b) solve the differential equation manually, and (c) write a MATLAB mfile program to solve the differential equation using dsolve command and plot the dynamic response of the system for OSIS 7.5 hr with At = 0.5 min.

I'm trying to compute:

evalf[32](ln(1+exp(-64)));

and got:

1.6039999999999999999999999998714*10^(-28)

But I think it should be something close to:

evalf[32](exp(-64));

i.e:

1.6038108905486378529760870341423*10^(-28)

Is this a bug?

 

Hi all,

I'm using dsolve (numeric) for a system of ODE with initial conditions.

Is it possible to show (at the same time with solving) the values of time and an unknown when solving a system of ODE before the end of calculation. Of course, the calculation time is high and I want to know before the calculation is finished if the solution is converging.

Also, I use the option range in my calculations from 0 to 200s (seconds) and more. I do'nt know how I can speed up the solution with less memory.

Please find in the attached file an example.

dsolve1_1r.mw

Thank you in advance for your help.

Dear Maple users

I have had problems with Maple 2020. I am using Windows 10, by the way, and have several versions of Maple installed: 2019, 2018 and even 2017. Now however I am unable to open a Maple file from Windows Explorer either by double-clicking or by right-clicking and choosing "Open with" Maple 2020. Nothing happens when I try so! It works properly when I choose older versions of Maple. I have about the same problems on another computer, an Ultrabook. It is really a pain having to open Maple 2020 and then having to browse all the way down a file path ... 

NB! I have tried reinstalling, but it didn't help!

I hope someone have an idea how to solve this issue. Can it be solved in the Windows Registry?

Regards,

Erik

Hi,

I need to plot a contour plots of x versus f that satisfy two following equations

2.884460657-2.884460657*sqrt(1-.6933705250*x)-5.000000000*f*(1-(1-.8*x)^.2500000000)-(12.50000000*(1-f))*(1-(1-.32*x)^.2500000000) = 0;

1/sqrt(1-.6933705250*x)+1.250000000*f/(1-.8*x)^.7500000000+(3.125000000*(1-f))/(1-.32*x)^.7500000000 = 0

How can I do that by Maple?

If the coefficient of x can be changed from 0.1 to 0.6, what is your suggestion(s) to  repeat the above process for each of these coefficients?  

 

With the new features added to the Student[LinearAlgebra] package I wanted to go over some of the basics on how someone can do Linear Algebra in Maple without require them to do any programming.  I was recently asked about this and thought that the information may be useful to others.
 

This post will be focussed towards new Maple users. I hope that this will be helpful to students using Maple for the first time and professors who want their students to use Maple without needing to spend time learning the language.
 

In addition to the following post you can find a detailed video on using Maple to do Linear Algebra without programming here. You can also find some of the tools that are new to Maple 2020 for Linear Algebra here.

The biggest tools you'll be using are the Matrix palette on the left of Maple, and the Context Panel on the right of Maple.

First you should load the Student[LinearAlgebra] package by entering:

with(Student[LinearAlgebra]);

at the beginning of your document. If you end it with a colon rather than a semi colon it won't display the commands in the package.

Use the Matrix Palette on the left to input Matrices:

 


Once you have a Matrix you can use the context panel on the right to apply a variety of operations to it:

 


The Student Linear Algebra Menu will give you many linear algebra commands.

 


You can also access Maple's Tutors from the Tools Menu

Tools > Tutors > Linear Algebra



If you're interested in using the commands for Student[LinearAlegbra] in Maple you can view the help pages here or by entering:

?Student[LinearAlegbra]

into Maple.

I hope that this helps you get started using Maple for Linear Algebra.

I have been using Alex Potapchik & & Alec Mihailovs' procedure for generating a multivariate sample

https://www.mapleprimes.com/questions/37539-Generate-Data-From-A-Multivariate-Normal

How can I plot the eigenvectors in the 3D scatterplot?

``

restart

kernelopts(version); interface(version)

`Maple 2019.2, X86 64 WINDOWS, Nov 26 2019, Build ID 1435526`

 

`Standard Worksheet Interface, Maple 2019.2, Windows 10, November 26 2019 Build ID 1435526`

(1)

with(LinearAlgebra); with(Statistics); with(plots)

MultivariateNormalSample := proc (Sigma, V, N) local d; d := LinearAlgebra:-Dimension(V); LinearAlgebra:-LUDecomposition(Matrix(Sigma, datatype = float[8]), 'method' = 'Cholesky').ArrayTools:-Alias(Statistics:-Sample(Normal(0, 1), d*N), [d, N])+ArrayTools:-Replicate(Vector[column](V, datatype = float[8]), 1, N) end proc

Cov := Matrix([[4, 2.5, .4], [2.5, 2, .2], [.4, .2, .5]])

Cor := simplify(MatrixPower(DiagonalMatrix(Diagonal(Cov)), -1/2).Cov.MatrixPower(DiagonalMatrix(Diagonal(Cov)), -1/2))

S := MultivariateNormalSample(Cov, `<,>`(0, 0, 0), 1000); Statistics:-CovarianceMatrix(S^%T); map(Statistics:-Mean, [S[1], S[2]])

Determinant(Cov)

.795

(2)

Z := Scale(S^%T)

E, V := Eigenvectors(Cor)

E := Re(E); V := Re(V)

Vector(3, {(1) = 2.0005950859349144, (2) = .11194337607751015, (3) = .8874615374875758})

 

Matrix(%id = 18446746188592589870)

(3)

plots:-pointplot3d(Z, axes = normal, thickness = 1, symbol = circle, axis[1] = [color = black], axis[2] = [color = blue], axis[3] = [color = green], color = "DarkRed", orientation = [30, 75], viewpoint = "circleright", symbolsize = 1)

 

NULL

 

Download Plot_eigenvectors_in_3d_scatterplot.mw

First 10 11 12 13 14 15 16 Last Page 12 of 1676