MaplePrimes Questions

Hi . Can I download Maple on my IPad Pro 12.9?

P1 := x^2+y^2-4:
P2 := y^2-2*x+2:

Original question is find CAD of (some y)[P1 <0 and P2 <0]

how to use maple 12 and maple 2015 to find Q1,Q2,Q3 which are projection of P1 and P2

my book show sample points are [-4,-1-sqrt(7),-3,-2,0,1,3/2,-1+sqrt(7),9/5,2,3]
but FindSamples result is not the same with my book, is it my book wrong or FindSamples function wrong?
I find result of my script is the same as book's quantifier position at 7,8,9 though sample points has little different

how to generalize my following script to multiple variables x, y, z, and more ?

and

I compare with maple 2015 result are different from my book solution, is maple 2015 more advanced version CAD? 

with(ListTools):

P1 := x^2+y^2-4:
P2 := y^2-2*x+2:

Q1 := x^2 + 2*x - 6;
Q2 := x^2 - 4;
Q3 := x - 1;

sourcesamples := sort(evalf([solve(Q1), solve(Q2), solve(Q3)]),`<`);

FindSamples:=proc(sourcesamples)
local N, P;
N:=nops(sourcesamples);
P:=proc(a,b)
local a1, b1, m1, n, m;
if a=b then error "Should be a<>b" fi;
a1,b1:=op(convert(sort([a,b],(x,y)->evalf(x)<evalf(y)),rational));
count := 0:
for n from 1 do
m1:=a1*n;
m:=`if`(type(m1,integer),m1+1,ceil(m1));
count := count + 1:
if is(m/n>a1) and is(m/n<b1) then return m/n fi;
od;
print("count=",count);
end proc:
[ceil(sourcesamples[1])-1, seq(op([sourcesamples[i],P(sourcesamples[i],sourcesamples[i+1])]), i=1..N-1),sourcesamples[N],floor(sourcesamples[N])+1];
end proc:

RemoveComplex := proc(yy)
local result, k:
result := []:
for k in yy do
if Im(k) = 0 then
result := [op(result), k]:
end if:
od:
if result = [] then
result := []:
end if:
return result:
end proc:

Joinsolution := proc(param1, param2group)
local result, k:
result := []:
for k in param2group do
result := [op(result), [param1, k]]:
od:
return result:
end proc:

CADsamples := FindSamples(sourcesamples):
CADresult1 := []:
for mm in CADsamples do
#print(mm):
if MakeUnique(RemoveComplex([solve(subs(x=mm, P1)), solve(subs(x=mm, P2))])) = [] then
CADresult1 := [op(CADresult1), op(Joinsolution(mm,[0]))];
else
CADresult1 := [op(CADresult1), op(Joinsolution(mm,FindSamples(sort(evalf(MakeUnique(RemoveComplex([solve(subs(x=mm, P1)), solve(subs(x=mm, P2))]))),`<`))))];
end if:
od:
CADresult1;

for mm in CADresult1 do
if subs(x=mm[1],subs(y=mm[2], P1)) < 0 and subs(x=mm[1],subs(y=mm[2], P2)) < 0 then
print("solution ", mm, SearchAll(mm[1],CADsamples), evalf(mm)):
end if:
od:

Compare with

with(RegularChains):
with(ChainTools):
with(MatrixTools):
with(ConstructibleSetTools):
with(ParametricSystemTools):
with(SemiAlgebraicSetTools):
with(FastArithmeticTools):
R := PolynomialRing([x,y]):
sys := [x^2+y^2-4,y^2-2*x+2]:
N := []:
P := []: 
H := [x]:
dec := RealTriangularize(sys,N,P,H,R):
proj := Projection(sys, N, P, H, 1, R);
Display(dec, R);

P := SamplePoints(sys, R);
Display(P, R);
cad := CylindricalAlgebraicDecompose(sys, R);
 

The following transfer function has zero/pole cancelation. I am trying to create a transfer function object, but Maple automatically simplifies the transfer function before it gets to the DynamicSystem call, which result in different output than what I expected.

I do set the cancellation=false option, even though this is the default. The problem is Maple does pole/zero cancelation before the call.

I tried to add '' around it to delay evaluation, but it did not work.  

restart;
alias(DS=DynamicSystems):
DS:-SystemOptions(cancellation=false,complexfreqvar=s):
tf:=DS:-TransferFunction('-(s - 1)/((-2 + s)*(s - 1))'):
DS:-PrintSystem(tf)

You can see it did pole/zero cancelation.

In Matlab and Mathematica, this does not happen. For example

Clear["Global`*"];
sys = TransferFunctionModel[-(s - 1)/((-2 + s) (s - 1)), s]

Same with Matlab:

>> s=tf('s');
>> sys_tf =-(s - 1)/((-2 + s)*(s - 1))

sys_tf =
 
     -s + 1
  -------------
  s^2 - 3 s + 2
 
Continuous-time transfer function.

What do I need to do in Maple to keep the transfer function without pole/zero cancelation (this affects the state space realization later on when this cancelation happens)

I am using Maple 2019 at this moment as Maple 2020 is busy.

 

As I was going over latest build using Physics:-Latex I noticed this.

The complex number I should be translated to lower case in latex.

This is what the original latex() does (and also what Mathematica TeXForm does).

It does not look good at all to have complex number I be translated to I and remain UPPER case I

Here is an example

expr:=[solve(x^2+2*x+2=0,x)];
Physics:-Latex(expr)

gives

[-1+I, -1-I]

While  latex(expr) gives the much better and more mathematical output:

[-1+i,-1-i]

 

interface(version);

`Standard Worksheet Interface, Maple 2020.1, Windows 10, July 30 2020 Build ID 1482634`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 790. The version installed in this computer is 789 created 2020, September 1.`

expr:=[solve(x^2+2*x+2=0,x)];
Physics:-Latex(expr)

[-1+I, -1-I]

[-1+I, -1-I]

latex(expr)

[-1+i,-1-i]

 


Is it possible to have Physics:-Latex translate complex numbers like latex() did?

Please see attached worksheet below.

Download latex_issue_9.mw

I'd like to suggest Physics:-Latex change its use of \textit{} and replace it with \mathit{} 

\mathit is the better Latex command to use, since the Latex generated goes into math mode and \mathit is designed to be used in math mode and hence has a better spacing for this. Making the final Latex look a little better.

Here is an example showing the difference.

restart;
ode:=diff(y(x),x) = y(x)/(x^2+1);
sol:=dsolve(ode);
Physics:-Latex(sol)

Gives

y \left(x \right) = \textit{\_C1} {\rm e}^{\arctan \left(x \right)}

It will be better to generate

y \left(x \right) = \mathit{\_C1} {\rm e}^{\arctan \left(x \right)}

Here is the difference when both are compiled using latest texlive 

Since all the Latex generated is meant to be used in math mode, \mathit would be better choice. It is considered wrong to use \textit in math mode actually, even though it does compile.

Here is the latex file used to generate the above pdf

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{maplestd2e}


\begin{document}

\[
y \left(x \right) = \textit{\_C1} {\rm e}^{\arctan \left(x \right)}
\]

\[
y \left(x \right) = \mathit{\_C1} {\rm e}^{\arctan \left(x \right)}
\]

\end{document}


 

interface(version);

`Standard Worksheet Interface, Maple 2020.1, Windows 10, July 30 2020 Build ID 1482634`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 789 and is the same as the version installed in this computer, created 2020, September 1, 23:54 hours Pacific Time.`

ode:=diff(y(x),x) = y(x)/(x^2+1);
sol:=dsolve(ode);
Physics:-Latex(sol)

diff(y(x), x) = y(x)/(x^2+1)

y(x) = _C1*exp(arctan(x))

y \left(x \right) = \textit{\_C1} {\rm e}^{\arctan \left(x \right)}

 


thank you

Download latex_issue_8.mw

I use WINDOW 10 

for j from 1 to 3 do
pout := cat("C:/Users/Eli/Documents/Animation/", "file", j, ".bmp"):
print(pout):
plotsetup(bmp, plotoutput = pout):
# plot (...)
od:

 

Hi, I have a problem related to the cancellation of the square root with a square in its argument, see the image below.

Thanks in advance,

Santiago

 

i have a task who is like this:

let h(x)=2/f(x)

and the function f meets the following criteria

 

f(-1)=4 and f '(-1)=2

 

what is h'(-1)

 

how to i solve this, i am thinking of ordinary differential equations (ODEs)

and dsolve funktion in maple. but how do i do this.

or is there another way to solve it

 

 

 Hello , I need to plot the following on the same axes of implicit plot where discrete wavenumbers k1, k2, k3 on the same set of axes (the wavenumbers are points [k1,0], [k2,0], [k3,0], ...) , where k_{n}=2*n*Pi/L and the domain [0,L] 

Could you please help , I couldn't do. Thank you

 

restart;
with(plots, implicitplot);
alpha := 0.1;
beta := 0.1;
mu := 0.5;
u := 0.5;
v := 1;
gamma = 0.1;
                          alpha := 0.1

                          beta := 0.1

                           mu := 0.5

                            u := 0.5

                             v := 1

                          gamma = 0.1

Eq := -2*sigma*alpha*beta*mu*u - sigma*alpha*beta^2*u*v - 2.0*mu*alpha*beta^2*u*v - gamma^2*k^2*alpha*beta*u + beta*sigma^2*v + sigma^3 + 2*mu*sigma^2 - alpha*beta*sigma^2*u + sigma*beta^2*u*v + gamma^2*k^2*sigma + 2.0*mu*beta*sigma*v + 2.0*mu*beta^2*u*v;
                                            2  2              2
 Eq := 0.0995 sigma + 0.004500 - 0.005 gamma  k  + 1.095 sigma 

           3        2  2      
    + sigma  + gamma  k  sigma


implicitplot(Eq, k = 0 .. 10, sigma = -0.1 .. 0.1);
 

Please can someone help me out, have been trying for a very long time now on how to differentiate the lines on the graph.......please find attachment below and correct..................................................................

 

 restart;
  with(plots):
#
# Define the ODE system
#
  odeSys:= { (diff(F(eta), eta, eta, eta))*(1+epsilon-alpha((diff(F(eta), eta, eta))^2))+F(eta)*(diff(F(eta), eta, eta))+S*(diff(F(eta), eta))-(1/2)*S*eta*(diff(F(eta), eta, eta))-(diff(F(eta), eta))^2-M*(diff(F(eta), eta)), (diff(theta(eta), eta, eta))*(1+R)-delta*(diff(F(eta), eta))^2-Pr((3/2)*S*theta(eta)+(1/2)*S*eta*(diff(theta(eta), eta))-2*(diff(F(eta), eta))*theta(eta)+F*(diff(theta(eta), eta)))};
#
# Define the first set of boundary conditions
#
  bcs1:= { F(0) = 0, (D(F))(0) = 1, (D(F))(inf) = 0, theta(0) = 1, theta(inf) = 0
         }:

  RVals:=[0.1, 0.5, 1]:
  for k from 1 by 1 to numelems(RVals) do
      pList:=[ epsilon = 0.18, M = 0.5, S = 1.5, delta = 0.3, Pr = 1.5, alpha = 0.4, R = RVals[k],inf=1
]:
      sol1[k]:= dsolve( eval
                        ( `union`( odeSys, bcs1),
                           pList
                       ),
                       numeric
                     );
     od:
  display
  ( [ seq
      ( odeplot
        ( sol1[i],
          [eta, theta(eta)],
          eta=0..2
        ),
        i=1..numelems(RVals)
      )
    ],
    color = [red, green, blue],
    title = typeset( theta(eta), " versus ", eta),
    titlefont = [times, bold, 20]
  );
 

I want to do a organised introduction in Maple  with the student and main vectorcalculus package
Is there some studymatrial to find for this ?
 

 

I am using Maple to solve a system of ODEs numerically. Right now, I want to find the integration of the output of the system of ODEs. How it is possible to do this? 

F := dsolve(ODESys union ICs, {y0(t), y1(t), y2(t), y3(t)}, type = numeric)

Y0 := t -> rhs(op(2, F(t)))

Now, I want to find int(Y0,t=0..1).

Why this simple case cannot be simplified to Complete Square form

restart:

EQ := 1/4*n[1]^4 - 1/2*n[1]^2 + 1/4

simplify(1/4*n[1]^4 - 1/2*n[1]^2 + 1/4, 'size')

with(Student[Precalculus])
CompleteSquare(EQ);
                   

Dear all, 

Would you tell me a way to apply the identity relationship in Maple, to rewrite 'subexp' below to 'subexp2'?


 

restart;

subexp := M__a*sin(omega*t + alpha)*I__a*sin(omega*t + phi);

M__a*sin(omega*t+alpha)*I__a*sin(omega*t+phi)

(1)

subexp2 := M__a * I__a * (-1/2*(cos(2*omega*t + alpha + phi)-cos(alpha - phi)));

M__a*I__a*(-(1/2)*cos(2*omega*t+alpha+phi)+(1/2)*cos(alpha-phi))

(2)

is(subexp = subexp2);

true

(3)

 


 

Download Q20200901.mw

In the plane, an ABC triangle is considered for the vertices B and C are fixed, A being variable so that b +c remains constant and equal to a given length l. (b=distance(A,C), (c=distance(A,B)
How to show that the product tan(B/2=*tan(C/2) remains constant ?

First 386 387 388 389 390 391 392 Last Page 388 of 2308