Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi!

I am new to Maple and have a problem I've been struggling with all day.

I have a pendulum and need to find a equation of motion in the y-direction. Please find my code in the picture below.

I can see that my problem starts at Eqy where the differentiation deletes one of the right-hand-side parts because I don't have any function y(t), and Maple thinks y(t) a constant (?)
Can somebody please tell me what I'm doing wrong?

 

Thank you in advance!




This is my code for the Extended Euclidean Algorthim which should return integer l, polynomials pi,ri,si,ti for 0<=i<=l+1. And polynomial qi for 1<=i<=l such that si(f)+ti(g) = ri and sl(f)+tl(g)=rl=GCD(f,g).
The problem is, I keep getting division by zero. Also it evaluates pi = lcoeff(ri-1 - qiri) to be zero, everytime. Even when I remove this it still says there is a division of zero, which must be coming from qi:=quo(ri-1,ri, x); however I do not know why considering the requirements for the loop are that r[i] not equal zero. I really could use a fresh pair of eyes to see what I've done wrong. Any help would be greatly appreciated!!

Hi there,

Is there a way in which i can solve the following optimal control problem numerically with Maple?

 dH/dt=λ-µ H-(1-u1)β H V+δ I,

dI/dt=(1-u1)β H V-σ I,

‎dV/dt=(1-u2)k I-γ‎V,

dλ1/dt=-1+λ1µ+β‎‎V(1-u1)(λ1-λ2),‎

dλ2/dt=λ1δ+λ2σ-λ3(1-u2)k‎,‎

‎dλ3/dt=β H(λ1-λ2)(1-u1)‎‎+λ3γ.

where

u1=βHV(λ1-λ2)/A1,

u2=-λ3kI/A2,

σ = α + δ,

and

H(0)=1.7*10^8,    I(0)=0,    V(0)=400.

 

λ=5*10^5,    µ=0.003,     β=4*10^(-10),    α=0.043,    δ= 0.2                  k=6.24,       γ‎=0.65.

A1=900, A2=1000.

 

Answers and advice are very appreciated. 

Thank you all for reading.

Aylin

I got a problem with a difficult ode,the commands are below.

restart;
sys := 1.*(diff(x(t), t, t)) = piecewise(b(t) = 1, 0, 1003.0-1000.*x(t)-30.*(diff(x(t), t))-25.*signum(diff(x(t), t)-.1)-.3*signum(diff(x(t), t))*exp(-2*abs(diff(x(t), t)))), x(0) = 1, (D(x))(0) = 0;
mu := 100;
stick := [diff(x(t), t) = .1, b(t) = piecewise((1000.-1000.*x(t))^2 < 10000, 1, 0)];
slip := [[0, 10000 < (1000.-1000.*x(t))^2], b(t) = 0];
sol:=dsolve({sys,b(0)=0},numeric,discrete_variables=[b(t)::float],events=[stick,slip],event_maxiter=1000000,output=listprocedure,maxfun=0,range=0..8);

any advice is appreciated.

I have to calculate the data in JSON format and export the result back to JSON.

It would be greate if there is any JSON package for Maple.
---

Also, I use`ExportMatrix` to export the result to CSV format.

But there are some comma (`,`) in the result content and `ExportMatrix` does not handle it well.
Is there any solution for export data to CSV file in my situation?

Thanks.

 

Let a planar polygon P without selfintersections be given through the plottools:-polygon command.
How to find its triangulation as a set of triangles (The indication of common sides is desired too.) in an optimal way with Maple? This is used in the finite element method.

Triangulation

Hi,

I have coded up a vector that is of my interest. The code runs witout any problem and gives me exactly what I want.

newtest.mw

All I want to know, is that if there are more efficient way to do so?

Any tricks, or better use of a particular function that I wasn't aware?

The only tiny bit of unsatisfactory is that, the (1-w) term is at the first term of the addition, is that possible to move it to the last term? Which is more conventional to read.

 

Thanks,

 

casper

Hello Dears

I have this equation

                                          (Napla)^4 * F(x,y) + k^2 *  (Napla)^2 * F(x,y)= 0,      (1)

which may be written as a non-homgeneous Helmholtz equation as

                                          (Napla)^2 * F(x,y) + k^2 * F(x,y)= g(x,y),                (2)

where the function g(x,y) is a harmonic function and (Napla)^2 is the laplace's operator in two dimension.

Can Maple solve equation (1), it will be better. If not may be solve equation (2).

 

how to calculate the cobordism between two ideals

for example, how to convert below word relation into graph

a^2 = 1

a*b = b*a

From some scientific experiments, the following set of data is available
(1.0, 2.33),(2.0, 0.0626),(3.0, −2.16),(4.0, −2.45),(5.0, −0.357),(6.0, 2.21),(7.0, 2.75),(8.0, 0.636),(9.0, −2.45).

We need to use least squares method to fit the curve to the data
y = a + b cos(x) + c sin(x) + d cos(2x) + e sin(2x)


Show your solution procedure in Maple and get the best fit for the coefficients. Finally
plot the data and the y curve together on the same graph to visualize the fitting. For the
data, use blue circles while for the y curve, use red solid line style. Use the leastsquares
command we learned in LinearAlgebra package.

Find the eigenvalues and eigenvectors for

A =
2 0.37 0
0 1.1 −4.29
1.6 0 2.2


Can you estimate the largest eigenvalues (in absolute value) using Power method for this
problem? Try to explain why if you can

If I have a list, how can I write a program to see is that list is graphical? So far I have

graphicalseq := proc (L::list)

local i::integer, N;

N := convert(L, `+`);


if type(N, odd) then print("Sequence is not graphical")


else if numelems(L)-1 < L[1] then print("Sequence is not graphical")
end if;


end if;

end proc;

I know I still have to keep going to determine whether the sequence is graphical, but I'm not sure how.

 I was thinking of trying to somehow use Havel-Hakimi's theorem, but again I'm not sure how. Any hints would be appreciated.  I can't use the is Graph Sequence function

How do I permanently change the current directory on a MAC computer?

 

Kind regards

 

Per Kirkegaard

is it possible to assume element of matrix 0 or 1

how to write?

after write this, is it possible to display possible matrices which each element is 0 or 1

with(LinearAlgebra):
GetRing := proc(sol)
ringequation := 0;
mono1 := 0;
for j from 1 to 3 do
mono1 := 1;
for i from 1 to nops(sol[1][j]) do
mono1 := mono1*op(i, sol[1][j]);
od:
ringequation := ringequation + mono1;
od:
return ringequation;
end proc;
M := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);
sys := a*b+a = GetRing(MatrixMatrixMultiply(Matrix([[a,b,c]]), M));
solve(sys);

First 189 190 191 192 193 194 195 Last Page 191 of 2097