Maple 2018 Questions and Posts

These are Posts and Questions associated with the product, Maple 2018

I want to find the numbers a, b, c, d, t, m, n of this equation. I tried
 

restart:
 k := 0:
 for a to 10 do
for b to 10 do 
for c to 10 do 
for d to 10 do 
for t to 2 do 
for m to 10 do
for n to 10 do 
if a > c and igcd(a, b, c, d, t, m, n) = 1 and abs(b)+abs(d)-n <> 0 then X := [solve(abs(a*x+b)+abs(c*x+d)-t*x^2+m*x-n = 0)]; if nops(X) = 6 and type(X[1], integer) and type(X[2], integer) and type(X[3], integer) and type(X[4], integer) and type(X[5], integer) and type(X[6], integer) then k := k+1; L[k] := [a, b, c, d, t, m, n, X[]] 
end if end if
end do end do end do end do end do end do end do; 
L := convert(L, list); 
k; 
L;

I can not get the result for along time. How can I get the result and reduce the time?

I want to define the co-ordianates (phi, PI, ....)  as functions of some variable eg:- x,y.

 

,Hello dears

I have the following function

where L=10 and I want to plot this function, so I use 

But it does not work.

Is there any help.

Amr

I am trying to find six integer numbers a, b, c, d, n, p so that this equation
abs(a*x+b)+abs(c*x+d)+x^2+n*x+p = 0
has 6 integer solutions are 1, 2, 3, 4, 5, 6. I tried
f:=x-> abs(a*x+b)+abs(c*x+d)+x^2+n*x+p;
solve([f(1) = 0, f(2) = 0, f(3) = 0, f(4) = 0, f(5) = 0, f(6) = 0], [a, b, c, d, n, p])


This equation has no solution. Is there six integer numbers a, b, c, d, n, p so that this equation has 6 integer solutions?

I have just found one solution is
solve(abs(-2*x+5)+abs(-2*x+9)-x^2+7*x-16 = 0, x);

With Mathematica, I see at here 
https://mathematica.stackexchange.com/questions/212808/find-integers-a-b-c-d-m-n-p-so-equation-has-six-distinct-solutions

Maple programming is certainly full of pitfalls for the unwary and the inexperienced as my recent difficulty demonstrates.

I have encountered disconcerting behaviour in the way the Maple type system treats tables and names as a result of last name evaluation.  In my case, it created a rather difficult debugging session in a procedure I was writing.

Specifically, in a procedure where a defined table is an argument, within the procedure the table satisfies the type test for a table, as well as for a name and a symbol. In retrospect, I realize that this makes sense when last name evaluation is in play, but I don't recall any mention of this particular side effect in the help files describing parameter processing or tables.  (or I forgot)
Once identified the problem, I found two fixes:

1) test for a table before I testing for a name(symbol).
2) use eval(T) as the argument when calling the procedure.  

I feel a bit uneasy about the first approach because I'm not certain there isn't some pitfall writing a procedure where the order of execution changes the outcome. Is the second approach the best way (as a rule of thumb) to feed a table into a procedure.

A somewhat artifical worksheet is attached to illustrate the problem and these approaches.


tabletypeanomaly.mw

I was trying to display a Physics[Vectors] vector name in a 3dplot with an up arrow
on it. I found that this old 2008 trick still works in MAPLE 2018.

 


 

restart;

with(plots):
with(Physics[Vectors]):

# Using MAPLE 2018.2

a:=arrow([-1,1,1],view=[-1.5..1.5,-1.5..1.5,-1.5..1.5]):

v_;
t:= textplot3d([-1.1,1.1,1,v_]):
display(a,t);

v_

 

 

# I found this on an old 2008 post
t:= textplot3d([-1.1,1.1,1,typeset(`#mover(mi(` || v ||  `),mo("→"))`)]):
display(a,t);

 


 

Download VectorTypeSetting.mw

Hi everybody:

I have an equation that attached with this question and my goal is to solve it, how can do it?

Note: in this equation must be considered 49.32883964 <= x and x is real.

solve_equation.mw

 

 

Hi,

I am new to Maple. I am attempting to find the asymptotic expression for the confluent Heun function (HeunC) under certain set of parameters (i.e. still symbolic and possibly complex, but less parameters compared to the general case).

From the literature, it seems that for certain cases there are such closed analytic expressions.

Is it possible to find such in Maple? I tried using "asympt", which gave me a generic error (...unable to compute series).

Thank you very much.

Good day to you all.

I would like to construct a plot of several data sources and would like to understand how I can animate each event.

For instance - consider a plot of 2 data sets (a simple example is in the attached worksheet), one as a point and another as a column. What is the most efficient way to construct this? Following that, how can both data sets be animated in synch?

Thanks for reading!

MaplePrimes_Example.mw

Hello,

I was working one of the problems for my course in structural dynamics and came across the following function that needs to be plotted. How can we do it in maple 2018.

 

I am trying to figure out which computational method is used in function Issimilar, (which determines similarity of matrices) in Maple 2018 and whether or not its a rational one.

Dear experts

I am using Maple to solve a complex equation. My idea is to separate real and imaginary parts and then solve a set of the equation when both real and imaginary parts are zero. the following are the equation and the way I made real and imaginary parts;

(K*( Q*sinh(K)*cosh(Q)-K*cosh(K)*sinh(Q))*(1+s*K^2)    +p*(-4*K^2*Q*(K^2+Q^2)        +Q*(Q^4+2*K^2*Q^2+5*K^4)*cosh(K)*cosh(Q)        -K*(Q^4+6*K^2*Q^2+K^4)*sinh(K)*sinh(Q)))/(K^2*Q*cosh(Q))

eq:= (K*( Q*sinh(K)*cosh(Q)-K*cosh(K)*sinh(Q))*(1+s*K^2)+p*(-4*K^2*Q*(K^2+Q^2)+Q*(Q^4+2*K^2*Q^2+5*K^4)*cosh(K)*cosh(Q)-K*(Q^4+6*K^2*Q^2+K^4)*sinh(K)*sinh(Q)))/(K^2*Q*cosh(Q)):

so the K and the Q are both complex variables and p and s are constant.

p := 0.1019367992e-3, s := 7.135575943      K:=Kr+I*Kim    Q:= sqrt(K^2-I*h^2*2*Pi/1.0e-6)

K:=Kr+I*Kim;

Q:= sqrt(K^2-I*h^2*2*Pi/1e-6);

therefore the real and imaginary parts of the equation are 

A:=evalc(Re(eq)):   B:=evalc(Im(eq)):

finally, I tried to solve it as following

sys:={eval(A,[p=nu^2/g/h^3,s=sigma/rho/g/h^2])=0,eval(B,[p=nu^2/g/h^3,s=sigma/rho/g/h^2])=0}:

sol2:=(fsolve(sys,{Kr=0..1,Kim=4..5}));

sys:={eval(A,[p=nu^2/g/h^3,s=sigma/rho/g/h^2])=0,eval(B,[p=nu^2/g/h^3,s=sigma/rho/g/h^2])=0}:

sol2:=fsolve(sys,{Kr=0..5,Kim=0..5},maxsols=5);

 

the problem is that Maple can not solve it and returns the command. I  know that there is solutions. How can I solve this equation?

 

the maple file is attached.mapleprime.mw

==============================================================

I guess Maple use Newton method to solve equation or system of equations. Is there an alternative? I mean what are the possible methods?

Hello users. I have a question on my work.

I'm trying to construct the equation and plot it. And I got 2 errors(warning).

Please help me how to solve this problem check the image below and attached file.

 

 

Question_plot_the_curvature.mw

 

Maple can easily solve the B4 problem of the Putnam Mathematical Competition 2019  link

 

B4.  Let F be the set of functions f(x,y) that are twice continuously differentiable for x≥1, y≥1 and that satisfy the following two equations:
    x*(diff(f(x, y), x))+y*(diff(f(x, y), y)) = x*y*ln(x*y)

x^2*(diff(f(x, y), x, x))+y^2*(diff(f(x, y), y, y)) = x*y

 

For each f2F, let

 

"m(f) = min[s>=1]  (f(s+1,s+1)-f(s+1,s)-f(s,s+1)+f(s,s))"

 

Determine m(f), and show that it is independent of the choice of f.


 

# Solution

pdsolve({
x*diff(f(x,y),x)+y*diff(f(x,y),y) = x*y*ln(x*y),
x^2*diff(f(x,y),x,x)+y^2*diff(f(x,y),y,y) = x*y
});

{f(x, y) = (1/2)*(x*y+2*_C1)*ln(x*y)-(1/2)*x*y-2*_C1*ln(x)+_C2}

(1)

f:=unapply(rhs(%[]), x,y);

proc (x, y) options operator, arrow; (1/2)*(y*x+2*_C1)*ln(y*x)-(1/2)*y*x-2*_C1*ln(x)+_C2 end proc

(2)

h := f(s+1, s+1) - f(s+1, s) - f(s, s+1) + f(s, s);

(1/2)*((s+1)^2+2*_C1)*ln((s+1)^2)-(1/2)*(s+1)^2-(s*(s+1)+2*_C1)*ln(s*(s+1))+s*(s+1)+(1/2)*(s^2+2*_C1)*ln(s^2)-(1/2)*s^2

(3)

minimize(h, s=1..infinity);

(4+2*_C1)*ln(2)-1/2-(2+2*_C1)*ln(2)

(4)

answer = simplify(%);

answer = 2*ln(2)-1/2

(5)

 


Download putnam2019-b4.mw

Hello,

I have a question regarding the dsolve function in Maple. I am trying to solve a system of 5 first order ODE's. First I solve the differential equations to arrive at the general solution using the dsolve command. Here Maple already produces very large and slow output while I would actually expect a much more compact output. 

Then I want to evaluate the final solution by using the initial conditons. At this point Maple keeps 'evaluating..' and does not come up with a solution. Only when I fill in all the parameters Maple finds a solution ( still very slow ). However as I want to be able to play with the input parameters after evaluation I want a solution without having to fill in the parameters prior to solving the system.

My question is whether I am presenting the system of ODE's in the right way to Maple. Should I rewrite the system for Maple to be able to produce a more dense solution? Or should I for instance use Laplace Transform to simplify the equations prior to solving?

Please help!

Joa

 

restart;

eq1 := sig_total-sig2(t)-sig3(t)-sig4(t)-sig5(t)+T1*(-(diff(sig2(t), t))-(diff(sig3(t), t))-(diff(sig4(t), t))-(diff(sig5(t), t))) = u1*(diff(eps(t), t));
eq2 := sig2(t)+T2*(diff(sig2(t), t)) = u2*(diff(eps(t), t));
eq3 := sig3(t)+T3*(diff(sig3(t), t)) = u3*(diff(eps(t), t));
eq4 := sig4(t)+T4*(diff(sig4(t), t)) = u4*(diff(eps(t), t));
eq5 := sig5(t)+T5*(diff(sig5(t), t)) = u5*(diff(eps(t), t));

dsolve({eq1, eq2, eq3, eq4, eq5}, {eps(t), sig2(t), sig3(t), sig4(t), sig5(t)});
sig_total := sig_0;
desys := {eq1, eq2, eq3, eq4, eq5}; ic := {eps(0) = sig_0/(E1+E2+E3+E4+E5), sig2(0) = sig_0/(1+(E1+E3+E4+E5)/E2), sig3(0) = sig_0/(1+(E1+E2+E4+E5)/E3), sig4(0) = sig_0/(1+(E1+E3+E2+E5)/E4), sig5(0) = sig_0/(1+(E1+E3+E4+E2)/E5)};

solution := combine(dsolve(desys union ic, {eps(t), sig2(t), sig3(t), sig4(t), sig5(t)})); assign(solution);


E_total := 33112; a := .1; b := .2; c := .15; d := .2; e := .35;


E1 := a*E_total; E2 := b*E_total; E3 := c*E_total; E4 := d*E_total; E5 := e*E_total; T1 := 1; T2 := 10; T3 := 100; T4 := 1000; T5 := 10000; u1 := T1*E1; u2 := T2*E2; u3 := T3*E3; u4 := T4*E4; u5 := T5*E5; sig_0 := 2;


plot(eps(t), t = 0 .. 672, y = 0 .. 0.12e-3);
y := eval(eps(t), t = 672);
evalf(y);
 

Download Maxwell_solve_new_method_5_units.mwMaxwell_solve_new_method_5_units.mw

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