MaplePrimes Questions

Search Questions:

Simple, but racking my brains, what is the formula for the sequence 2,3,4,6,8,9,10,12,14,15,16,18,...?

I have problem: Let  A(2,0,0), B(0,3,0), C(0,0,6) and D(1,1,1) be four points and Delta is the line passing through the point D so that sum of distances from the points A, B, C to Delta maximum. Find a direction vector of Delta.

I tried. Let v(a,b,c) where a^2 + b^2 + c^2 = 1 and my code
 

with(Student:-MultivariateCalculus):
with(Optimization):
A := [2, 0, 0]: 
B := [0, 3, 0]: 
C := [0, 0, 6]: 
DD := [1, 1, 1]: 
v := <a, b, c>: 
d := Line(DD, v): 
d1 := Distance(A, d): 
d2 := Distance(B, d): 
d3 := Distance(C, d): 
S := d1+d2+d3: 
Maximize(S, {a^2+b^2+c^2 = 1});

I didn't get the result. How to get the numbers a, b, c?

Hello,

Is it possible to expand vector calculus identities directly in Maple without taking them to basis form (i.e. their component partial derivatives).

For example: 

restart

with(Physics[Vectors]):

%Curl(u*%Gradient(v)) = u*%Curl(%Gradient(v)+`&x`(%Gradient(u), %Gradient(v)))

 

Given the Left Hand Side, can Maple come up with the RHS on its own?

Many Thanks.

Let (u (n)) be the sequence defined by u (n + 1) = 3.5u(n) (1 - u (n)) and u (0) = 0.4.
1. Create the sequence s whose elements are [k, u (k]) for k varying from 0 to 100.
2. Graph the list of points with the plot function and the style = point option.

1. Write the list of numbers that are the sum of two squares of integers a ^ 2 and b ^ 2 with 0 <= a, b <= 5.
2. Select the odd numbers from the previous list. What seems to be their general form

I was trying to see if Maple can solve this problem from my class textbook

When I tried boundary conditions all zero on the Laplace PDE in semicircular cylinder, pdsolve generates internal error.

The boundary conditions should not all be zero for nontrivial solution, but the question is why Maple generate this internal error? Is this a bug? Using Physics package 362, Maple 2019 on windows 10.

restart;

unassign('r,theta,z,f,H');
pde:=VectorCalculus:-Laplacian(u(r,theta,z),'cylindrical'[r,theta,z])=0;
bc:=u(r,theta,0)=0, u(r,theta,H)= f(r,theta), u(r,0,z)=0, u(r,Pi,z)=0,u(a,theta,z)=0;
sol:=pdsolve([pde,bc],u(r,theta,z)) assuming a>0,r<a,H>0,theta>0,theta<Pi

(diff(u(r, theta, z), r)+r*(diff(diff(u(r, theta, z), r), r))+(diff(diff(u(r, theta, z), theta), theta))/r+r*(diff(diff(u(r, theta, z), z), z)))/r = 0

u(r, theta, 0) = 0, u(r, theta, H) = f(r, theta), u(r, 0, z) = 0, u(r, Pi, z) = 0, u(a, theta, z) = 0

"sol := "

unassign('r,theta,z,f,H');
pde:=VectorCalculus:-Laplacian(u(r,theta,z),'cylindrical'[r,theta,z])=0;
bc:=u(r,theta,0)=0, u(r,theta,H)= 0, u(r,0,z)=0, u(r,Pi,z)=0,u(a,theta,z)=0;
sol:=pdsolve([pde,bc],u(r,theta,z)) assuming a>0,r<a,H>0,theta>0,theta<Pi

(diff(u(r, theta, z), r)+r*(diff(diff(u(r, theta, z), r), r))+(diff(diff(u(r, theta, z), theta), theta))/r+r*(diff(diff(u(r, theta, z), z), z)))/r = 0

u(r, theta, 0) = 0, u(r, theta, H) = 0, u(r, 0, z) = 0, u(r, Pi, z) = 0, u(a, theta, z) = 0

Error, (in assuming) when calling '`PDEAdvisor/2nd_order/Series/ThreeVariables`'. Received: 'invalid input: rhs received _Z3, which is not valid for its 1st argument, expr'

 


 

Download bug3.mw

How 2 argumented matrices can be written in one matrix 

Hello,

I currently have

And was wondering if there's a way to declare x as a real so that this evaluates to 1?

Why, when parsing Pi/6, is it displayed differently in a textplot situation?

parse("Pi/6")
               

with(plots):
textplot([1,1,parse("Pi/6")])

Hellow,I use maple 13 (linux)

 

How can I get a output data file solution of my ODE? For example, the maple resolved the harmonic equation and got a u(t) function, but I want manipulated the data in a external programm, like gnuplot ou xmgrace.

 

Sorry my bad english!

 

wave.mw

 

i wnat to take this export numbers from for loops in the matrix
restart;
with(LinearAlgebra);
f(x) :=  3*x^2+1 :
for i by .5 to 3.5 do print(i, f(i)) end do;

same this pic

I want to get solutions (approximate solutions) of the inequality g(x) > 0. I tried. 
 

restart; 
fprime := x-> (x-1)*(x-2)^2*(x-3)*(x-4); 
f := unapply(simplify(int(fprime(x), x)), x); 
g := unapply(expand(f(3*x+1)-x^3+3*x), x); 
solve(g(x) > 0, x);

I got

Please, I need to use Maple to solve Euler-Bernoulli Beam on Pasternak Foundation using Homotopy Perturbation Method.

The governing equation is 

initial conditions are 

the boundary condition is 

The governing equation represents Euler-Bernoulli beam on a generalized Pasternak viscoelastic foundation under an
arbitrary distributed dynamic load. in which E, I , ρ ,A are the parameters of the beam, representing Young’s modulus of elasticity, moment of inertia, density and area of cross section, respectively. K,C and Gp are spring stiffness, damping coefficient, and shear coefficient of the foundation. Moreover, y(x, t) and F(x, t) are defined as the vertical deflection of the beam and the generic arbitrary dynamic loads, respectively, where the loads distribute along the x-axis and t is time.

 

I will appreciate anyone who can help me with a Maple solution.

 

Thank you.

Would anybody be able to explain to me why I had to rewrite this one baby-procedure that has an if-statement inside my larger procedure, so that I could get a later on if-statement to work? As best I can tell, they mean exactly the same thing.


 

Information that may be pertinent:

 - The entire (overall) procedure worked without throwing any warnings prior to my adding this new if-statement.
 - The if-statement itself worked perfectly fine on another worksheet, though I hadn't tested it inside a procedure.
 - Commenting out the if-statement but retaining the interior commands led to the sheet compiling again, showing that it was in fact the presence of the if-statement causing the issue. 
 - When I commented out the offending baby-procedure that started throwing the warning, the sheet once again compiled.

The added if statement:

if eval_size > 4 then Search(max(seq(eval_cont[i], i = 4 .. eval_size)), eval_cont); evals_pairlist := evals_pairlist[[1 .. 3, %]] fi:

The error I get, and its "positioning": 

Error, invalid expression for inline function

 

Hello,

How I can remove some problems in my code.

I wrote it before in  software, but in some lines, I have some problems with it.

How I can change it in maple to run well?


 

restart

M := 2; B := 1; C := 3; K := 6; f := 2*exp(-t); q0 := 1; qd0 := -1; qd20 := 1; alpha := 1/2; beta := 1/12; gammaa := 1/4; h := .1; Tf := 2

"N:=size(M,1)  T:=0:h:Tf;  lt:=length(T);  F:=subs(f,t,T);  F:=subs(t=T,f);    qd30:=M\(F(1)-B*qd20-C*qd0-K*q0);   q:=zeros(N,lt)  qd:=zeros(N,lt)  qd2:=zeros(N,lt);  qd3:=zeros(N,lt);  q(:,1):=q0  qd(:,1):=qd0  qd2(:,1):=qd20  qd3(:,1):=qd30"

Error, invalid function arguments

"N:=size(M,1)  T:=0:h:Tf;  lt:=length(T);  F:=subs(f,t,T);  F:=subs(t=T,f);    qd30:=M\(F(1)-B*qd20-C*qd0-K*q0);  q:=zeros(N,lt)  qd:=zeros(N,lt)  qd2:=zeros(N,lt);  qd3:=zeros(N,lt);  q(:,1):=q0  qd(:,1):=qd0  qd2(:,1):=qd20  qd3(:,1):=qd30"

 

"A:=M+alpha*h*B+gammaa*(h^2)*C+beta*(h^3)*K;  for n:=1:lt-1 do      D:=F(n+1)-B*(qd2(:,n)+(1-alpha)*h*qd3(:,n))-...          C*(qd(:,n)+h*qd2(:,n)+(0.5-gammaa)*(h^2)*qd3(:,n))-...          K*(q(:,n)+h*qd(:,n)+(h^2)/2*qd2(:,n)+(1/6-beta)*(h^3)*qd3(:,n));      qd3(:,n+1):=A\D;      qd2(:,n+1):=qd2(:,n)+(1-alpha)*h*qd3(:,n)+alpha*h*qd3(:,n+1);      qd(:,n+1):=qd(:,n)+h*qd2(:,n)+(0.5-gammaa)*(h^2)*qd3(:,n)+gammaa*(h^2)*qd3(:,n+1);      q(:,n+1):=q(:,n)+h*qd(:,n)+(h^2)/2*qd2(:,n)+(1/6-beta)*(h^3)*qd3(:,n)+...          beta*(h^3)*qd3(:,n+1);  end do"

Error, invalid function arguments

"A:=M+alpha*h*B+gammaa*(h^2)*C+beta*(h^3)*K;  for n:=1:lt-1 do      D:=F(n+1)-B*(qd2(:,n)+(1-alpha)*h*qd3(:,n))-...          C*(qd(:,n)+h*qd2(:,n)+(0.5-gammaa)*(h^2)*qd3(:,n))-...          K*(q(:,n)+h*qd(:,n)+(h^2)/2*qd2(:,n)+(1/6-beta)*(h^3)*qd3(:,n));      qd3(:,n+1):=A\D;      qd2(:,n+1):=qd2(:,n)+(1-alpha)*h*qd3(:,n)+alpha*h*qd3(:,n+1);      qd(:,n+1):=qd(:,n)+h*qd2(:,n)+(0.5-gammaa)*(h^2)*qd3(:,n)+gammaa*(h^2)*qd3(:,n+1);      q(:,n+1):=q(:,n)+h*qd(:,n)+(h^2)/2*qd2(:,n)+(1/6-beta)*(h^3)*qd3(:,n)+...          beta*(h^3)*qd3(:,n+1);  end do"

 

plot(T, q, 'r-o', 'linewidth', 1.5)

Error, (in plot) unexpected options: [r-o, , 1.5]

 

``


 

Download

 

1 2 3 4 5 6 7 Last Page 1 of 1745