Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Warning, data could not be converted to float Matrix

If we have two univariate polynomials $f(x)$ and $g(x)$ such that

$gcd(f(x),g(x))=1$

then we know there exist two other polynomials $a(x)$ and $b(x)$ such that $a(x)f(x)+b(x)g(x)=1$. For example, if $f(x)=x^3−1$ and $g(x)=x^2+2$, then we can set

$a(x)=\frac{2x−1}{9}$, $b(x)=\frac{−2x^2+x+4}{9}$

Here the polynomials $a(x)$ and $b(x)$ are known as Bezout polynomials and they can be found using the extended Euclidean algorithm, which I know how to do using pen and paper, but not in Maple.

So my question is: in Maple, is there a way, given $f(x)$ and $g(x)$, to solve for $a(x)$ and $b(x)$?

Another training example (number 2 and last) for finding all solutions to a system of equations:

f1 := x3^2-0.1*x1^4-0.05*x2^4+1;
f2 := x1^3+x2^3+0.05*x3^3-1; 
f3 := -2*cos(3*x1)+2*cos(3*x2)-2*cos(3*x3)+1;

In my version, there are 116 solutions.
Is it so?

What kind of solution is it (see (3))? Why is there no solution when I put the initial condition v(0)=C1? Secondly, eq. (2) can be reduced to a first-order differential equation?

restart

interface(showassumed = 0)

declare(v(y))

(1)

q := v(y)*(diff(diff(diff(v(y), y), y), y))+(2*v(y)-(diff(v(y), y)))*(diff(diff(v(y), y), y))+(diff(v(y), y))*(v(y)^3+v(y)-(diff(v(y), y))) = 0

v(y)*(diff(diff(diff(v(y), y), y), y))+(2*v(y)-(diff(v(y), y)))*(diff(diff(v(y), y), y))+(diff(v(y), y))*(v(y)^3+v(y)-(diff(v(y), y))) = 0

(2)

dsolve(q)

v(y) = ODESolStruc(_a, [{(diff(diff(_b(_a), _a), _a))*_b(_a)^2+_b(_a)*((diff(_b(_a), _a))^2*_a+_a^3-(diff(_b(_a), _a))*_b(_a)+2*(diff(_b(_a), _a))*_a-_b(_a)+_a)/_a = 0}, {_a = v(y), _b(_a) = diff(v(y), y)}, {y = Int(1/_b(_a), _a)+_C1, v(y) = _a}])

(3)

NULL

dsolve({q, v(0) = C1})

v(y) = C1

(4)

NULL

Download CD_ode.mw

 

I have been making animated 3d plots recently; the last time was perhaps three years ago, and I had some problems then.  If I recall correctly, I couldn't make an animated 3d plot that was plotted in non-Cartesian coordinates.

 

I am very happy to report that this works very smoothly now in Maple 2022, and it's pretty fast, too.  I have a fairly complex function to plot, involving piecewise polynomials on a tensor product grid in the xi and eta variables (actually, I let plot3d pick out the grid; it seems happier to do so) and then plot them on an elliptical base, in coordinates x = d*cosh(xi)*cos(eta) and y=d*sinh(xi)*sin(eta)  (d is just a numerical constant, giving the location of the foci at (d,0) and (-d,0)), for 0 <= xi <= xi[0] (the outer elliptical boundary) and 0 <= eta <= 2Pi.  The straightforward command works, and building a sequence of plots and using plots[display] works.  I put option remember into my procedure w(xi,eta) and because the sample points are consistent for the time-dependent function exp(I*omega*t)*w(xi,eta) the xi-eta grid needs only to be done once and then one can compute (basically) as many frames as one wants in rapid succession.

 

Works great.  Thanks, folks!

 

for k to nplots do
    t := evalf(2*Pi*(k - 1)/nplots);
    plts[k] := plot3d([(xi, eta) -> focus*cosh(xi)*cos(eta), (xi, eta) -> focus*sinh(xi)*sin(eta), (xi, eta) -> Re(exp(omega*t*I)*w(xi, eta))], 0 .. xi[0], 0 .. 2*Pi, colour = ((xi, eta) -> Re(exp(omega*t*I)*w(xi, eta))), style = surfacecontour, lightmodel = "none");
end do;
plots[display](seq(plts[k], k = 1 .. nplots), insequence = true);
 

File:

PCA.mw

I am a student in the middle of a projekt, where math is an essential part of the task. I have done a lot of work in a maple document, but this document suddenly became corrupted. I've tried restarting and loading backups and f ollowed Can I repair a corrupted Maple document/worksheet file? (maplesoft.com) but the solutions didn't work on my document.

Also tried the DeleteBadCharacters() proccess, but i get the error "Error, (in XMLTools:-ParseString) Element type "Equation" must be followed by either attribute specifications, ">" or "/>"."

Is there a way to fix this issue, and prevent the same issue occuring in the future? 

Thanks in advance!

Hi !

I want to create a notation for a function, let's say :

f:=(x,y,z)->something

such that when I ask for

f(x,y,z) 

Maple returns

fx,y(z) or anyother "nicer view" of that expression.

This is (I think) a similar action of replacing BesselJ(n,x) by Jn(x).

Many thanks for your answers !

Kevin

This is a follow-up to a previous question I asked that was answered with code that used "%.". From the documentation I can see that % is a nullary operator that gives us the value of "the last expression", which I think means the last result of an evaluated expression.

In my previous question, I wanted to be able to display for example, a constant times a matrix, without the product being evaluated.

For example, given A:=<1,2;3,4>:, we need to use Maple Input, and then we can write c__1.A and the output will be an expression that has c__1 then the dot product symbol and then the matrix A written out.

My question is simply: what exactly is "%."?

Hi all, 

I am working with the physics package and I want to know if there is a difference between Physics:-CompactDisplay and PDEtools:-declare ?

As well as the difference between Physics:-Simplify and simplify.

For both cases, can they be used as the same ? Are they incompatible in some case?

Thanks !

Kevin

I would like to display an expression that is a matrix, the dot operator, and another matrix. That is, I want to display a multiplication of matrices, without the multiplication being evaluated.

Something like

<1,2;3,4> '.' <6,7,8,9>

Is this possible?

Here is some context around why I want to do this. Perhaps the main reason I use Maple is for the symbolic math capabilities using 2d math input. I want to create worksheets that look like what I would write on paper. 

For example, let's say I have a matrix that is defined by <I, F;0,0>, where each of elements is actually another matrix. I want to multiply this matrix by its transpose, which would be something like <I, 0^T; F^T, 0^T>.

I would like to display <I, 0^T; F^T, 0^T> .  <I, F;0,0>.

Hello guys
I created a document recently and, the next day, when I tried to open it, I received the following message:

        Recover corrupted file and save as

Does anyone know how to recover a corrupted file?
Regards,
Oliveira

Dear all

I would like to expand x^m using JacobiP  ( jacobi polynomials), with the two parameter alpha  and alpha +2, I have a result in my book using alpha and alpha+1 but i would like to get a similar result using alpha and alpha+2 

Inverse_formula_jacobi_polynomials.mw

Thank you 

I have a system of ODE's which are solved numerically (with rkf45) to get function values over time. And i have datapoints for these functions, and would like to compare and calculate the error/deviation between model and data. I can't find a command / mechanism that does this.

Is it possible?

I know maple help has exercies where you can learn from. I was, however, wondering if there is a standard place where people upload their specialized worksheets and maple documents they have used for research once they make it public.

First 248 249 250 251 252 253 254 Last Page 250 of 2218