Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

i've come across a confusing behavior where the same command (a copy/paste of another command) is giving an output in a a different form.

Attaching a screen shot that shows this. Eq 6.8 is executed just after 6.7.

(i know the command is weird, i.e. subs(beta=beta, ..), etc.. this is part of some larger code base and i just put this in when trying to undertand what's going on).

I would hope for the same command to spit out the same output in this case. (nothing else gets assigned/called in betwen).

any idea what's going on?

 

i'm on maple 2018.2 on linux.

thanks

 

 

I vaguely recall others complain about disappearing Code Edit Regions. Does anyone else recall that? I had one disappear from the very top of the attached worksheet (right after the restart), causing me to lose about 15-30 minutes of work. I've totally recreated the work, so I have no interest in this worksheet being repaired. I'm merely posting it in case anyone wants to do an autopsy on it.

Another issue that happened twice with this worksheet is that when I unchecked the "Expanded" box on the Code Edit Region menu (pull out from the right side of the screen) and copied the text to my clipboard (for posting on MaplePrimes), that copied text was missing my most-recent changes to the code. They reappeared when I expanded again. (But it's really difficult to copy-and-paste a multi-screen Code Edit Region when it's expanded.)

My final issue (and this has bothered me for years), is how the heck are you supposed to find the line with the syntax error in a several-hundred-line Code Edit Region? Unlike with inline code, the cursor is not placed near the error location._Binomial_missing_Code_region.mw

How do I remove infinity from a list

s:=[f(x) , exp(a), GAMMA(2x)-1 , infinity , 1, -infinity]

remove(has,%,infinity)

does not work.

It should yield

s:=[f(x) , exp(a), GAMMA(2x)-1 , 1]

How to solve the following second order ODE system? (I want to solve analytically and numerically and to compare the results) Thanks. Best regards.

 

where

Initial conditions:

Other symbols in the equation (v_0,a_0 etc.) are constant.

MY CODE TRY:  Code.mw

I tried to write a code for matrices in the question. ( I used x instead of gamma in the code)

restart:
n:=2:
  M:= tau -> Matrix
      ( n,
        n,
        shape=identity
      )
      +Matrix
      ( n,
        n,             (i,j)->2*x*sin(i*Pi*v_0*tau)*sin(j*Pi*v_0*tau)
            ):
  C:=tau -> Matrix
              ( n,
                n,
                (i,j)->4*(i*Pi*v_0*tau)*sin(i*Pi*v_0*tau)*cos(j*Pi*v_0*tau)
              ):
  K:=tau -> n^4*Pi^2* Matrix
      ( n,
        n,
        shape=identity
      )-Matrix
      ( n,
        n,
        (i,j)-> 2*mu*(i*Pi*v_0)^2*sin(i*Pi*v_0*tau)*sin(j*Pi*v_0*tau)+2*mu*(i*Pi*a_0)*sin(i*Pi*v_0*tau)*cos(j*Pi*v_0*tau)
      ):
f:=tau -> Vector
      ( n,
        (i,j)-> x*Pi^2*(Pi/2+v_0^2*sum(((1-(-1)^k)/k^3)*sin(k*Pi*v_0*tau),k=1..infinity)-a_0*sum(((1-(-1)^k)/k^4)*cos(k*Pi*v_0*tau),k=1..infinity))*sin(i*Pi*v_0*tau)
      ):
      
 
X:= Vector(n, i-> x[i](t)): 
sys:= M(tau).diff~(X, tau$2)+C(tau).diff~(X, tau)+K(tau).X=f(tau):









 

how I can determined time period?

thank you

period.mw
 

d := (10+20*cos(Omega*t)+30*cos(9*sqrt(2)*t))^2

(10+20*cos(Omega*t)+30*cos(9*2^(1/2)*t))^2

(1)

with(StringTools)

period(d)

period((10+20*cos(Omega*t)+30*cos(9*2^(1/2)*t))^2)

(2)

``


 

Download period.mw

 


I get the following errors when attempting to use the Sockets package to interface with the serial input and output for a USB device connected and reported to have no known problems by Windows 10:

with(Sockets):
LookupService("busboy");
Error, could not determine determine port number for service "busboy"

LookupService(998);

Errror, cannot  determine "tcp"  service on port 998




server :=
proc (sid)
Sockets:-Write(sid, sprintf("Hello %s on port %d, from %s\r\n", Sockets:-GetPeerHost(sid), Sockets:-GetPeerPort(sid), Sockets:-GetHostName()))
end proc;

Sockets:-Serve(GetPeerPort(sid), server);
 
Error, (in Sockets:-GetPeerHost) Unknown error

sid := Open("localhost", "echo");

Sockets:-Serve(GetPeerPort(sid), server);

Error, (in Sockets:-Serve) cannot bind address: Unknown error
 

 

How can we solve the following pde by Maple? 

where v is velocity, v with dot is acceleration. (So, I think we will assume that acceleration is fixed.) And \delta is Dirac distribution.  E,I,m, M , g are fixed numbers.

Boundary conditions are:

Initial conditions are:

 

You can find the equation in the code: question.mw

Hi,

this "sum(1/(1+x)^t, t=1..infinity)" is (in my opionon) one of the most standard infinity summation and has the closed form 1/x. 
i used maple 18 and it was executed and i got the closed form 1/x.

with maple 2018 i get the non executed form, also the same inert form as "Sum(1/(1+x)^t, t=1..infinity)".

if i try "sum(1/(1+2)^t, t=1..infinity)" i get 1/2 as result.

why does the version above not working? any ideas?

thank you.

Dear friends,

I'm trying to solve a linear system of PDEs. After applying the casesplit command Maple returns: 

diff(U, z, y, x, x) = 0; diff(G, y,y,z) = diff(U,x,y,z);  diff(G,x,y,z) = diff(U,x,x,z)     

(with U(x,y,z), G(x,y,z)) 

The solution to the first equation is U = F4(x, y)+ F3(x, z) + F2(y, z) + x*F1(y, z). 

However, given this solution, I cannot satisfy diff(G,x,y,z) = diff(U,x,x,z).  What could I be doing wrong? 

Many thanks for your help.  

Hi

I have a problem with my maple. 

 

corrupt file 

Is there anybody who can help me solve this problem. 

Casper 

sys:={x+y=10,x^2-y^2+z^2=1};

{x+y = 10, x^2-y^2+z^2 = 1}

(1)

isolve(sys, n);

{x = -(1/20)*(1+20*n)^2+101/20, y = (1/20)*(1+20*n)^2+99/20, z = 1+20*n}

(2)

_SolutionsMayBeLost;  # It was set in Maple 10 or so!  E.g. x=5,y=5,z=-1 is not found.

_SolutionsMayBeLost

(3)

# Workaround

yz:=eliminate(sys,x);

[{x = -y+10}, {z^2-20*y+99}]

(4)

S:=isolve(yz[2], n);

{y = 20*n^2-38*n+23, z = 19-20*n}, {y = 20*n^2-22*n+11, z = 11-20*n}, {y = 20*n^2-18*n+9, z = 9-20*n}, {y = 20*n^2-2*n+5, z = 1-20*n}

(5)

map(u -> ( u union eval(yz[1],u) ), [S])[];  # The correct solution

{x = -20*n^2+38*n-13, y = 20*n^2-38*n+23, z = 19-20*n}, {x = -20*n^2+22*n-1, y = 20*n^2-22*n+11, z = 11-20*n}, {x = -20*n^2+18*n+1, y = 20*n^2-18*n+9, z = 9-20*n}, {x = -20*n^2+2*n+5, y = 20*n^2-2*n+5, z = 1-20*n}

(6)

 

This may seem a bit trivial, but I prefer f'(x) to writing diff(f(x),x) in 1D input. How to achieve?

differential.mw


 

15

 

"maple init loaded..."

(1)

In Document mode, this works fine.

f := proc (x) options operator, arrow; x^2 end proc

proc (x) options operator, arrow; x^2 end proc

(2)

diff(f(x), x)

2*x

(3)

But I mainly use Worksheet (1D) mode, and I can't seem to acheve the same, without using diff(f(x),x)

``

f:x->x^2

proc (x) options operator, arrow; x^2 end proc

(4)

f'(x)

Error, unexpected single forward quote

 

``


 

Download differential.mw

 

Hello,

Simple question:

Why does

restart;

(exp(I*t))^q;

`assuming`([simplify(%)], [t > 0, t < 2*Pi, q > 0, q < 1])

 

 

not simplify to exp(I*t*q)

?

does anyone khow to force maple to automatically simplify expressions that look like this:

restart:

cc:=arctan(sin(phi)/cos(phi))-arccos(cos(phi))      
simplify(cc) assuming phi::real; #should be zero

i've played with convert/expand/simplify and in certain cases of course i can force maple to do this... (kind of manually).. but was hoping this could be more automatic.

thanks!

 

First 622 623 624 625 626 627 628 Last Page 624 of 2097