Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi again. I have been stuck on this for almost 3 hours by now, and i have ran out of ideas..

I am working on a proof called dandelin spheres, which proves you can get an ellipse by cutting a cone with a plane.

I have found the right equation for both semi circles, the line (cone) and the plane.

I have defined the spheres as semi circles, and the cone as a line, which i am plotting by using the surface of revolution command.

The problem lies within the fact, that i cannot use the intersectplot command with surface of revolution, and i need the plot to show the intersection between the plane and cone. 

The following shapes are defined:

cone line - f := x -> 0.5*x;
small sphere - g := x -> sqrt(0.8944271908^2 - (x - 2)^2)

bigger sphere - h := x -> sqrt(3.354101965^2 - (x - 7.5)^2)

plane - m(x, 0) := 1.216350358*x - 3.841106394

with the following command i recieve this output, which i nice, but i am missing the final part, the ellipse.

 

I hope someone can help a desperate student :)

- Oscar

Hello, everyone!

I have a problem. Colleague send me a figure in maple-file – .mw. How to export data from this plot? I usually use "plottools:-getdata" command, but what strategy should I apply in case of attached file?

 

Test-example.mw


Dear all,
I want to create a superscripted and subscripted variable in 1-D math. I know that I can establish a subscripted variable by using double “_”, for example, the execution of the following command causes assignment 2 to u__b, in which b is the subscript of u.
u__b:=2;
However, I don’t know any way to create either a superscripted variable or a variable having both the subscript and superscript in 1-D math.
Can anyone help me?
 Best wishes

Dear MaplePrimes community,

I'm trying to calculate the (Moore-Penrose) pseudoinverse of a matrix using the following code:

with(LinearAlgebra):
Identity := Matrix(2, 2, [[1, 0], [0, 1]]):
A := Matrix(2, 2, [[0.5661180126, 0.4338819876], [0.8316071431, 0.1683928571]]):
MatrixInverse(Identity - A, method = pseudo)

Unfortunately, the output appears to be meaningless (and it conincides with what I'm getting by calculating a simple matrix inverse using "MatrixInverse(Identity - A)"). Am I missing something? (And how do I calculate the (Moore-Penrose) pseudoinverse of the matrix (Identity-A)?)

Presenters:

Affiliated Research Professor Mohammad Khoshnevisan

Physics Department, Northeastern University

United States of America

&

Behzad Mohasel Afshari, Admitted Ph.D. student

School of Advanced Manufacturing & Mechanical Engineering

University of South Australia

Australia

Note: This webinar is free. For registration, please send an e-mail to m.khoshnevisan@ieee.org. The registration link will be sent to all the participants on April 26, 2021. Maximum number of participants =60

 

Vibrational Mechanics - Practical Applications- Animation 1

Vibrational Mechanics - Practical Applications- Animation 2

Vibrational Mechanics - Practical Applications- Animation 3

Special characters like æ,ø,å are causing some troubles when used in Maple Code attachments in workbooks.

I've managed to get around the problem by using HTML equivalents in the first run, but then this will cause problems when exporting the same strings to Excel.

Funnily this problem just arises in Workbooks, not when using the same code in a code edit region.

Special.zip

I have two functions u(x,y,t) and p(x,y,t).

I want to find the total derivative of D_x( p*u) (where * is the multiplication)

where D_x is as given in the attached file formula_of_D_x.pdf 

Also, it is given in the following link but it's not clear to me. I think it somehow resembles my query, but not clear about the syntax so that I should implement it on mine.

https://www.maplesoft.com/support/help/Maple/view.aspx?path=DifferentialGeometry/JetCalculus/TotalDiff

Dear all

Strange phenomena...Every thing is well coded.
Using numeric solution pdsolve and  and solution based on iterative solution, gives a slighty different curve.. 

All matrices are well coded, and everything is okay... But  what happen... to get two different curves at same time.

New_code.mw

Thank you for any help 

 

Dear all

if I have a vector defined as u[1..11,1]:=

How can display the coeffients of  this vectors 
can I plot the vector 

Thanks for any help

I have a complex PDE as follows:

where u(x, t) is a complex function.

The following function u_11(x, t) is a solution for the PDE above. 

 

 

where

 

I want to check whether the u_11(x,t) is a solution for the PDE or NOT. 

 


 How to correctly define the complex PDE in MAPLE?
 

PDE:=I*diff(u(x,t),t)+diff(u(x,t),x$2)+alpha*(abs(u(x,t))^2)*u(x,t)+ I*( gamma[1]*diff(u(x,t),x$3) + gamma[2]*(abs(u(x,t))^2)*u(x,t) + gamma[3]*diff((abs(u(x,t))^2),x)*u(x,t) )=0;

or

PDE:=I*diff(u(x,t),t)+diff(u(x,t),x$2)+alpha*(evalc(abs(u(x,t))^2))*u(x,t)+ I*( gamma[1]*diff(u(x,t),x$3) + gamma[2]*(evalc(abs(u(x,t))^2))*u(x,t) + gamma[3]*diff((evalc(abs(u(x,t))^2)),x)*u(x,t) )=0;

Let's check the solution is right or not:

k:=(gamma[2]+2*gamma[3]-3*gamma[1]*alpha)/(6*gamma[1]*gamma[3]);
omega:=(((1-3*gamma[1]*k)*(2*k-c-3*gamma[1]*(k^2))  )/(gamma[1]))+(k^2)-gamma[1]*(k^3);

uu[11]:=1/(gamma[2]+2*gamma[3])^(1/2)*(-3*(3*k^2*gamma[1]+c-2*k))^(1/2 )*sin(1/2/gamma[1]*2^(1/2)*(gamma[1]*(3*k^2*gamma[1]+c-2*k))^(1/2)*(-c*t+x))/ cos(1/2/gamma[1]*2^(1/2)*(gamma[1]*(3*k^2*gamma[1]+c-2*k))^(1/2)*(-c*t+x))*exp( I*(k*x-omega*t));
pdetest(u(x,t)=uu[11],PDE);

 

 download-code.mw

 

Solve the following problems using computer. Use Algorithm from  Algorithm 4.4 in the textbook with 1) n = 4,m = 8, 2) n = 8,m = 4, and 3) n = m = 6 to approximate the following double integral and compare the results to the exact solution
∫∫cos ydydx (interior integral from 0 to x and exterior integral is from 0 to pi)

Hi

I have crreated a transfer function of a rather complex system using TransferFunction() and recived a transfercundtion of a rather high order (n=10). However due to the kinematics of the model I know that is is posible to expres as an second order transfer function.

So I have been locking around Maple for a function that can help me reduce or approwqimate the transfer function as a sencond order but I have not found anything.

Is there a way to reduce/approximate an n order transfer function to a second order transfer function?

Mvh

Eric Ragnarsson

 

dear all

I have a linear system AX=b , I would like to compute the solution using Gradient conjugate method 

CS.mw

I get the following error
Error, (in LinearAlgebra:-LinearSolve) method SparseIterative incompatible with data of type anything
 

Thank you for any help

Hi

It want to generate all the words from a NL-letter alphabet and whose lengths are at most LW.

I could not find any function in the combinat package do to that (at least without combining some of them, I'm using Maple 2015 right now); maybe the Iterator package has some features do to that?

For the moment I use this procedure (which generates a few words of length LW+1 I have to suppress)

restart:
G := proc(d)
 local n, wo:
  global W:
  while max(length~(W)) < d do
    wo := copy(W):
    for n from 1 to nops(L) do
      W := {W[], cat~(wo, L[n])[]};
    end do:
    thisproc(d)
  end do:
end proc:


# Words of length not larger than LW which are made of at most NL letters

NL := 3:
L  := StringTools:-Char~([$65..65+NL-1]);
W  := L:
LW := 3:

G(3):
w3 := W;
                        ["A", "B", "C"]

{"A", "AA", "AAA", "AAB", "AAC", "AB", "ABA", "ABB", "ABC", "AC", 

  "ACA", "ACB", "ACC", "B", "BA", "BAA", "BAB", "BAC", "BB", 

  "BBA", "BBB", "BBC", "BC", "BCA", "BCB", "BCC", "C", "CA", 

  "CAA", "CAB", "CAC", "CB", "CBA", "CBB", "CBC", "CC", "CCA", 

  "CCB", "CCC"}


W  := L:
CodeTools:-Usage( G(12) ):
numelems(W);

memory used=0.62GiB, alloc change=422.58MiB, cpu time=13.70s, real time=8.37s, gc time=8.08s
                             797160

Words_Generator.mw

Do you have any idea to improve it from memory used and cpu time points of view)?

Thanks in advance

First 308 309 310 311 312 313 314 Last Page 310 of 2097