MaplePrimes Questions

I want to plot3d this function :
(2*Int(3*piecewise(x < 1, x, 1 < x, 2 - x)*piecewise(y < 3/2, y, 3/2 < y, 3 - y)*sin(Pi*x/2)*sin((2*Pi*y)/3), [y = 0 .. 3, x = 0 .. 2]))/3
 

So, I wrote : 

plot3d((2*Int(3*piecewise(x < 1, x, 1 < x, 2 - x)*piecewise(y < 3/2, y, 3/2 < y, 3 - y)*sin(Pi*x/2)*sin((2*Pi*y)/3), [y = 0 .. 3, x = 0 .. 2]))/3, x = 0 .. 2, y = 0 .. 3)

and I get :

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

I am totally new with integrals and I think there is a pb related to a bad writing of them.
Thank you for your answers.

I have numpy matrix say A

 

I want to print the matrix into a

A.txt.   file  phyton coding

Hi there.

I noticed some little bug:

example.mw

As you can see the second term in serie C looks like -M/sqrt(-M^2 + E) - k, but not like M*k/sqrt(-M^2 + E).

Hi Users!

Hope everyone is fine here. I want to find the values of M and L for any functions f(x,y) and y(x) such that

abs(diff(f, y))       for all a ≤ x ≤ b, -∞ < y < ∞ and

abs(diff(y, x, x, x))   for all a ≤ x ≤ b, -∞ < y < ∞

For example for

f:=y-x^(2)+1; 0 ≤ x ≤ 2, -∞ < y < ∞ and

y:=(x+1)^2-.5*exp(x); 0 ≤ x ≤ 2, -∞ < y < ∞

the values of L = 1 and M = 0.5exp(2)

I want to use python which has some added installtion inside my system in maplesoft itself as code is it possible

It may use networkx package say.

 

with(Python)

ImportModule("networkx");
Error, (in Python:-ImportModule) unable to start Python: could not create process, C:\Program Files\Maple 2020\bin.X86_64_WINDOWS\mpython

 

Python out will be as below it can be any arbitray Matrix of this for 

A:= [[0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [1. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1.]
 [0. 1. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 1. 0. 1. 0. 0. 1. 0. 0. 0. 0. 0.]
 [0. 0. 0. 1. 0. 1. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 1. 0. 1. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 1. 0. 1. 1. 0. 0. 0. 0.]
 [0. 0. 0. 1. 0. 0. 1. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 1. 0. 0. 1. 1. 1. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]
 [0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]]

we can observe the ". " is their which we need to replace by , and at the end of each ] inside it should need to be ],

If anyone can give a direct code like if i copy paste the above matrix it will output the maple type matrix for my input

Now A becomes

A:=[[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]

To remember the progam should work any arbitary such matricies not for this only case.

F(n,n+1),2) = F(Product(x, k=1..n), 2)

how to solve function F?

Update
 

Above equation is wrong, below is newly updated 

Expect F is product operator

F(2,3) + 2 = F(2,4)

F(3,4) + 3 = F(3,5)

solve([ F(1,2)+1=F(1,3), F(n,n+1) + n = F(n,n+2), F(n,n+1)= F(summation(k,k=1..n),2)],F) assuming n > 0

Expect F is new operator
solve([ F(1,2)*1=F(1,3), n*F(n,n+1) = F(n,n+2), F(n,n+1)= F(product(k,k=1..n),2)],F) assuming n > 0

Let A be the set of the first 1000 odd natural numbers. Use Maple’s commands for set operations to determine how many elements in A are also triangular numbers or prime numbers.

Use Maple to find all quintic polynomials f(x) such that f(1) = 2, f(2) = 3, f(3) = 4, f(4) = 6, f(5) = 10. Is there a cubic polynomial satisfying the conditions? If so, give this polynomial.

Use the bisection method in a while loop to estimate the root of f = (x − 1/9)(x − 2)(x − 3) which lies between 0 and 1 to an accuracy of 10^−4 .  

Good afternoon! I can not give such terms in the procedure, simplify and evalf do not help. Why does it write three lambdas instead of a lambda in a cube?
What can I do about it?


help.mw
 

 

I want to simulate the behaviour of a mass-spring system under an oscillating acceleration, but I also want that the mass remains between two rigid walls (no bouncing has to be considered).
Here is the notional example I use in the attached file (here x(t) will have to verify x(t) >= 0 and x(t) < 2).

s := t -> 10*cos(t)-x(t):

sys := { 
  diff(v(t), t)=s(t), 
  diff(x(t), t)=v(t), 
  v(0)=0, 
  x(0)=0
}:

When the mass reaches one wall it gets stucked at it until the acceleration allows it to take off from this wall. It can then move to the opposite wall and possibly get stucked at it waiting for appropriate conditions to fly again.
Here are two images to help you understand what happens:

  1. the first one represents the "unbounded" solution of the system above
  2. the second is the "bounded" solution
     

To obtain the right picture I construct the solution piecewise (the method, based on events and the use of discrete variables, is described in the attached file).
For some reasons I would like to build the global solution "in one shot" and no longer have to assemble it from elementary pieces (the blue, red and gray chunks on the right figure).
I've tried to do this through events but  I have failed so far (an ettempt is presented in the attached file).

From_wall_to_wall.mw

Could you show me how to use "events" to handle this problem?

Thanks in advance

Hi there.

It looks strange but simplify/symbolic cannot handle expression in file:

example.mw

Only after expanding numerator and denominator by hand.

I think simplify/symbolic should be smarter.

The following example (from help, direct call, without with) does not work.

restart;
(Q[`0`],Q[`1`],Q[`+`],Q[`-`],Q[`*`],Q[`/`],Q[`=`]) := (0,1,`+`,`-`,`*`,`/`,`=`):
A := Matrix([[2,1,4,6],[3,2,1,7],[0,0,5,1],[0,0,3,8]]):
LinearAlgebra:-Generic:-Determinant[Q](A, ':-method' = ':-BerkowitzAlgorithm');

==> error, (in hasoption)

We must use:

LinearAlgebra:-Generic:-Determinant[Q](A, method=LinearAlgebra:-Generic:-BerkowitzAlgorithm); # 37

which I suppose is not intended!
That's because the keyword name in the code appears as 'BerkowitzAlgorithm' instead of ':-BerkowitzAlgorithm'
(The problem occurs because there is an export LinearAlgebra:-Generic:-BerkowitzAlgorithm). 
 

Hi, everyone, here is my maple code

 

restart;
In := 5.75*10^(-12);             
M := 1000;

E := 10^12;

V := 100;

m := 2300;

K := 10^9;

A := E*In;
B := M*V^2;

C := 2*M*V^2;

F := M + m;

G := K;
pde := A*diff(w(x, t), x $ 4) + B*diff(w(x, t), x $ 2) + C*diff(w(x, t), x, t) + F*diff(w(x, t), t $ 2) + G*w(x, t);
tmax := 0.05;
xmin := 0;
L := 1;
bc := w(0, t) = 0, w(L, t) = 0, D[1, 1](w)(0, t) = 0, D[1, 1](w)(L, t) = 0;

ic := w(x, 0) = 0

pdsA := pdsolve(pde, eval({bc, ic}, L = 1), numeric, spacestep = 0.01)

 

 

 

I keep getting error message: Error, (in pdsolve/numeric/par_hyp) Incorrect number of initial conditions, expected 2, got 1

but when i change the pde to:

pde := A*diff(w(x, t), x $ 4) + B*diff(w(x, t), x $ 2) + C*diff(w(x, t), x, t) + F*diff(w(x, t), t) + G*w(x, t);

it works, although that is not what i am aiming for at all.

how may i solve this? my goal is to find w(x,t)

First 226 227 228 229 230 231 232 Last Page 228 of 2234