MaplePrimes Questions

Dear all

I just write a code, everything is well written, but using 

M := Multiply(y11, Transpose(s)) 

I get a table and not a matrix,  PLEASE see equation 19 and 20

probem_multiply.mw

Thank you for your help 

When trying to print a Maple Document as a PDF on Mac, I am now getting an "Error while printing" message. A 1-page pdf is created that's empty.   This is a new error, one that I've never seen when printing as PDF for any other Maple Document I've created.

I'm running Mac OS 12.3.1, the latest version of Mac OS and using Maple 2020.

I am trying to develop a recursive code to the above equations.  Note, U,X&Y are multivariate functions (in this case bivariate functions of (x,y)) i.e. U=U(x,y), X=X(x,y) etc.

Irrespective of what help says, both series and taylor return series(...) rather that big-O expression

From help:

> series(x/(1-x-x^2), x=0);
series(1*x+1*x^2+2*x^3+3*x^4+5*x^5+O(x^6),x,6)
> taylor(sin(x),x=Pi);
series(-1*(x-Pi)+1/6*(x-Pi)^3-1/120*(x-Pi)^5+O((x-Pi)^7),x=-(-Pi),7)
 

I am having problems setting up plots on a new computer.

plotsetup(x11);
interface(plotdevice);
x11
plot(sin(x));
Error, plot driver not found
plotsetup()
preplot = [], postplot = [], plotdevice = x11, plotoutput = terminal, plotoptions = ``

Find, using Maple, a triple [m,e,d] where m is the product of two 200 decimal digit primes, e is a random prime number of 100 decimal digits and d is the inverse of e modulo 
                            "phi(m)"

. Use this to encipher some message of your choice of at least 6 lines length using the RSA system. You may copy and paste text from some website. Then, decipher the enciphered text to obtain the original message.

Problem 4. 
Given that  m = pq where p and q are primes and that 
                   "phi(m) = (p - 1)*(q - 1)"

. Suppose that 
                "m = 10^100 + 598*10^50 + 67497"

 and  
             "phi(m) = 10^100 + 596*10^50 + 66900"

. Find p and q.  Check that the factors you find are indeed primes. 

[Hint: You have two equations and two unknowns.]

Problem 5.

Definition. The q-binomial coefficient ---denoted by qbinomial(n,k,q) --is defined by the formula
      qbinomial(n,k,q)    =       
"Product(q^i - 1, i = n - k + 1 .. n)/Product(q^i - 1, i = 1 .. 

   k)"

qbinomial(n,k,q) is a polynomial of degree k*(n-k) in the variable q. These polynomials are also called Gaussian polynomials or Gaussian  coefficients. They occur in various places in mathematics. For example qbinomial(n,k,q) is the number of k-dimensional subspaces of an n-dimensional vector space over a field with q elements.  An example:  qbinomial(6,3,q)  is the polynomial 

"q^9 + q^8 + 2*q^7 + 3*q^6 + 3*q^5 + 3*q^4 + 3*q^3 + 2*q^2 + q 

   + 1"

(a) Write a procedure to find qbinomial(n,k,q) and check to see that it agrees with the above for n=6  and k=3.  Note that to get nice output you will need to simplify, expand and sort the expression.

(b) Check whether or not the sequence of coefficients of the Gaussian polynomial qbinomial(n,k,q) is unimodal for  0 =< n < =10 and 0=< k < =n.  Do not print out all these in your final work. Just write a program to do the checking.  Have it print out the number of pairs (n,k) for which qbinomial(n,k,q) 's coefficients are not unimodal. This is a number from 0 to 66.

[Hint: You may use the following to convert the coefficients of a polynomial f in the variable q to a list:
>L:=[seq(coeff(f,q,i),i=0..degree(f,q))]; ]

Definition: A list or sequence of numbers 
                             "a[1]"


                             "a[2]"

, ..., 
                             "a[n]"

 is unimodal if there is an index i such that 
                         
                             "a[1]"

 <= 
                             "a[2]"

 <= . . . <= 
                             "a[i]"

 >= 
                           "a[i + 1]"

 >= 
                           "a[i + 2]"

 >= . . . >= 
                             "a[n]"


That is, the sequence is non-decreasing up to some point after which it is non-increasing. Note that i can be 1 or n.  A constant sequence is considered to be unimodal.

Examples of unimodal lists:

         [1, 1, 1, 1, 1],  
         [1,2,3,4,5,4,3,2,1], 
         [1, 2, 2, 3, 4, 5, 5, 5],   
         [5, 5, 4, 4, 3, 3, 1],   
         [1, 2, 2, 3, 3, 3, 4, 4, 2, 2, 1, 1, 1]

Examples of lists that are not unimodal:

          [1, 0, 1, 0], 
          [1, 1, 2, 2, 3, 4, 5, 2, 2, 6, 4, 2, 2, 1, 0]

(a) Write a procedure unimodal to check whether or not a list of numbers is unimodal. The input should be a list and the output should be true or false. 

One way to do this is to first write procedures called  increasing and decreasing which will check whether or not a sequence is non-decreasing (
                             "a[1]"

 <= 
                             "a[2]"

 <=...) or non-increasing (
                             "a[1]"

>= 
                             "a[2]"

>=...). Then for a list L use these procedures to check the two parts L[1..i] and L[i..n], n=nops(L) for each i. If you find an i such that the first list is "increasing" and the second is "decreasing" then you can return true. 

I have up to here.

I need help with this part.

For n from 10 to 15  check whether or not the sequence of binomial coefficients  

[binomial(n,0), binomial(n,1), binomial(n,2), . . ., binomial(n,n)]

is unimodal. 

Hello there, 

Would you allow me to ask this one question?

Is it possible to apply diffop2de() to three different functions in a single expression? For example, the attached worksheet shows an expression, 'eq_e5_9', where three time domain function derivatives are defined, D*Delta__delta(t), D*Delta__psi__d(t) and D*Delta__psi__q(t). However, once 'diffop2de(eq_e5_9, f(t))' is applied, none of them gets propely unrolled (e.g, D*Delta__delta(t)becomes d/dt*Delta__delta(t))

Besides, this is my third time attempting to post a question. The first one got disappeared with no sign, the second one came out with a site error message. 

In Kwon Park 

 

Download Q20220425.mw

Dear all

I have a nonlinear system of algebraic equations, I would like to solve it  without using fsolve and Newton's method. 
Maybe one can use, fixed point method or Broyden's method

Fixed_Broyden_method.mw

Can we solve the system of 4 equations, using the proposed methods

thank you 

Hi everyone, I have some questions about the printf func in maple.

As an image I attach below, I want to print this to the console so that I can presentation it for my teacher, because I'm using this palletes many times, only showing the result will make me and my teacher hard to check the right result. I trying using the sum palletes as a tring ("%s") and also the result as ("%f") too, but it wont work. Please help me with this, thanks a lot

Solve produces different output in the attachment depending on how it is used. Why is that and how can simplification to arctan(y/z) be avoided? Arctan(y/z) only gives correct angles for positive y and z.  I prefer arctan(y,z) output that I can subsequently simplify to the y and z ranges of interest (if possible). Imagine “wrong” simplification of complex algebraic output (e.g., from inverse kinematics).

Arctan.mw

I am using the method of alias(seq(c[k] = _C||k, k = 1..10)); for better latex of constants generated from solving an ode as recommended. See this for example. 

This works well 99.99% of the time. But now I noticed this in Maple 2022. Is this a display issue? When the constant is inside an inert Int it does not display the same as the other constant outside. Also the Latex is not the same. Even though lprint shows they are both correct.

This is the worksheet itself


 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

alias(seq(c[k] = _C||k, k = 1..10));
ode:=x*diff(y(x),x$2)-cos(x)*diff(y(x),x)+sin(x)*y(x)=2;
sol:=dsolve(ode);
lprint(sol)

c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10]

x*(diff(diff(y(x), x), x))-cos(x)*(diff(y(x), x))+sin(x)*y(x) = 2

y(x) = (c[2]+Int((c[1]+2*x)/(exp(Ci(x))*x^2), x))*exp(Ci(x))*x

y(x) = (c[2]+Int((c[1]+2*x)/exp(Ci(x))/x^2,x))*exp(Ci(x))*x

latex(sol)

y \! \left(x \right) =
\left(c_{2}+\textcolor{gray}{\int}\frac{\mathit{c[1]} +2 x}{{\mathrm e}^{\mathrm{Ci}\left(x \right)} x^{2}}\textcolor{gray}{d}x \right) {\mathrm e}^{\mathrm{Ci}\left(x \right)} x

restart;

ode:=x*diff(y(x),x$2)-cos(x)*diff(y(x),x)+sin(x)*y(x)=2;
sol:=dsolve(ode);
lprint(sol)

x*(diff(diff(y(x), x), x))-cos(x)*(diff(y(x), x))+sin(x)*y(x) = 2

y(x) = (_C2+Int((_C1+2*x)/(exp(Ci(x))*x^2), x))*exp(Ci(x))*x

y(x) = (_C2+Int((_C1+2*x)/exp(Ci(x))/x^2,x))*exp(Ci(x))*x

 


 

Download april_25_2022.mw

 

 

Hi,

I'm experimenting with some plot functions in Maple and cannot make the animate function to work, even for the help example (attached). It works fine when I insert it here but not in my worksheet.

with(plots)

NULL

plots[animate](plot, [A*sin(x), x = 0 .. 10], A = 0 .. 2)

 

NULL

Download animate_prob.mw

Any ideas?

First 198 199 200 201 202 203 204 Last Page 200 of 2308