MaplePrimes Questions

  How do you transform vector expression (*) into [M,A] – 3[M,B] = 7[M,C] using Maple command?

 

  Thank you for your help !

How to find the eigenvalues and eigenvectors of a problem that have some zero diagonal elements which dont have the usual form of the standard eigenvalue problem? I have tested some ways, but the results was not accurate enough.
If it is possible please provide me an example with relatively large matrices (e.g. M>50)
Note that M>N.

Hello there, 

Would you allow me to ask one question?

Is there any way to get a saturated water vapor pressure value with a temperature outside of the range?

The range here means [273.06 K, 647.096 K]. The pressure value certainly exists (T<273.06 K), but the API only comes up with an error. 

Here is the Maple worksheet where I got into this issue:

restart;

with(ThermophysicalData):

with(CoolProp):        

with(Units[Standard]):

with(ScientificConstants):

T2 := (-40.0 + 273.15) * Unit('K');

233.15*Units:-Unit(K)

(1)

xbb := 1: # 100% steam, saturated.

Pg2 := PropsSI("P", "T", T2, "Q", xbb, "water");

Error, (in ThermophysicalData:-CoolProp:-PropsSI) Temperature to QT_flash [233.15 K] must be in range [273.06 K, 647.096 K] : PropsSI("P","T",233.15,"Q",1,"water")

 

 

Download Q20220111.mw

Hello!

I'm new user in Maple and I have two question:

1. I have modeled transfer function in z term(without DynamicSystems). How quicky can I reearange it to difference equation to find coefficients?

2. I discretize transfer function of s to z using ToDiscrete(DynamicSystems) how here I can reearange this form to difference equation? 

I am studying the help pages for declare() statement in the PDEtool package. 
It can be used also for calculus(prime notation) for 1 variable and two variables (subscript notation) as i understand it now.

There is no input possible in Maple by using a prime notation and indexed functions notation?

Maybe with a alias ? ..remember that I can be chanced I (default) into the i for complex numbers 

Hello there, 

Would you allow me to ask these two questions?

1) is there any way to collect the expression 'eq14_2' w.r.t. DeltaP? The question is labeled as 'Q1' in the worksheet. 

2) Why does the 'DeltaP' term survive at the RHS of the expression 'eq14_2_3'? In other words, is it possible to cancel out the same term, 'DeltaP', in numerator and denominator?

restart;

eq14_1_3 := w[NET] = Delta*T[Sfg];

w[NET] = Delta*T[Sfg]

(1)

eq14_2 := w[NET] = -((v[2] + v[3])/2)((-DeltaP + P) - P) - ((v[1] + v[4])/2)((P - P) + DeltaP);

w[NET] = -(1/2)*v[2](-DeltaP)-(1/2)*v[3](-DeltaP)-(1/2)*v[1](DeltaP)-(1/2)*v[4](DeltaP)

(2)

simplify(eq14_2);

w[NET] = -(1/2)*v[2](-DeltaP)-(1/2)*v[3](-DeltaP)-(1/2)*v[1](DeltaP)-(1/2)*v[4](DeltaP)

(3)

collect(expand(eq14_2), DeltaP, distributed); # Q1

w[NET] = -(1/2)*v[2](-DeltaP)-(1/2)*v[3](-DeltaP)-(1/2)*v[1](DeltaP)-(1/2)*v[4](DeltaP)

(4)

Desired1 := w[NET] = DeltaP * (-v[2]*(-1)/2 - v[3]*(-1)/2 - v[1]*(1)/2 - v[4]*(1)/2);

w[NET] = DeltaP*((1/2)*v[2]+(1/2)*v[3]-(1/2)*v[1]-(1/2)*v[4])

(5)

eq14_2_2 := rhs(eq14_1_3) = rhs(eq14_2);

Delta*T[Sfg] = -(1/2)*v[2](-DeltaP)-(1/2)*v[3](-DeltaP)-(1/2)*v[1](DeltaP)-(1/2)*v[4](DeltaP)

(6)

eq14_2_3 := eq14_2_2 / DeltaP; # Q2

Delta*T[Sfg]/DeltaP = (-(1/2)*v[2](-DeltaP)-(1/2)*v[3](-DeltaP)-(1/2)*v[1](DeltaP)-(1/2)*v[4](DeltaP))/DeltaP

(7)

Desired2 := w[NET]/DeltaP =  (-v[2]*(-1)/2 - v[3]*(-1)/2 - v[1]*(1)/2 - v[4]*(1)/2);

w[NET]/DeltaP = (1/2)*v[2]+(1/2)*v[3]-(1/2)*v[1]-(1/2)*v[4]

(8)

 

Download Q20220110.mw

I am trying to plot the solution of the following complex-valued initial value problem (IVP), obtained numerically with dsolve:

odesys := {dy(x)/dx + I*y(x) = 0, y(0) = 1};

sol := dsolve(odesys,numeric,range=0..1);

In the Maple help page dsolve/numeric, they say that dsolve can solve complex-valued IVPs. When I try the code above, it seems to work (I don't get an error). But I can't find how to plot the real and imaginary parts of y(x). Indeed, odeplot(sol) yields an empty graph, and odeplot(Re(sol)) yields an error.

Does someone know how to do this? Thanks in advance for your help.

restart:

alias(f=f(t)):
alias(g=g(t)):

diff([f, g], t):  #ok

a := [alias()]:
diff(a, t);
      [0, 0]

More generally, how can we differentiate a list of aliases without naming them explicitely?

Thanks in advance

I must feed the not trivial zeros numbers into this aproximation formula ?

 

Riemann hypothese and staircase of primes

 

restart;

with(NumberTheory)

PrimeCounting(1)

0

(1)

pi(Pi)

2

(2)

PrimeCounting(10000)

1229

(3)

numelems(select(isprime, [seq(1 .. 10000)]))

1229

(4)

The prime counting function is approximated by Li(x) and x/ln(x).

plot([PrimeCounting(x), Li(x), x/ln(x)], x = 1 .. 500, legend = [pi(x), Li(x), x/ln(x)])

The staircase of primes approximated by two functions
Interesting is the video: How i learned to love and fear the Riemann Hypothesis

https://www.quantamagazine.org/how-i-learned-to-love-and-fear-the-riemann-hypothesis-20210104/

NULL

ps:=Array(1..30):
y:=0:
for n from 1 to 30 do
 if is(n,prime)
     then ps[n]:=plot([[n,y],[n,y+1],[n+1,y+1]]):
     y:=y+1;
     else ps[n]:=plot([[n,y],[n+1,y]]):
 end if ;
od;
with(plots):
display({seq(ps[n],n=1..30)}):  

plot([PrimeCounting(x)] ,x = 1 .. 35, legend = [pi(x)]):

plot([PrimeCounting(x), Li(x), x/ln(x)], x = 1 .. 35, legend = [pi(x), Li(x), x/ln(x)])

 

 

 

 

Prime counting function
What found RIEMANN for the prime counting function in relation to the zeta function after he defined the zeta function?

 

He found further a function what follows exactly the shape of the prime counting function

Final discovery v. Riemann.  

- step in the omhoog in de priemtelfunctie = log(p) (zie video)

 

Using the logarithmic primecount function( from Chebyshev) (approximation)
Further  analyse with this Chebyshev approximation formula in relation to the not trivial zero points from Riemann zeta function ( zeros) gives another real function for approximating the primecounting function what uses the non trivial zeros from Riemanns zeta function  in this function:

 

"(not trivial zeros ) u[k ] = "i*w[k]+v[k]   
Number now all nottrivial zeros in the upperhalfplane from down to bottom,  as u[1], u[2], u[3, () .. ()]

"`&varphi;`(x)  := x-ln(2Pi)-1/(2 )ln(1-1/(x^(2))) - (&sum;)2/(|u[k]|) x^(v[k]) cos(w[k] ln(x)-alpha[k])"

NULL

Its only alpha[k] that must be calculated out of the not trivial zeros and i must have a list of  serie of not trivial zeroes from the zeta function. => see Hardy's Z(t) ? from this ..... alpha[k]  can be calculated ?
All not trivial zeros are complex numbers laying on a line ,but  orginating from (0,0) in the complex plane as  vectors to the points    

varphi(x):= x - ln(2*Pi) - 1/2*ln(1 - 1/x^2) - sum(2*x^v[k]*cos(w[k]*ln(x) - alpha[k])/abs(u[k]), k = 1 .. infinity);

x-ln(2*Pi)-(1/2)*ln(1-1/x^2)-(sum(2*x^v[k]*cos(-w[k]*ln(x)+alpha[k])/abs(u[k]), k = 1 .. infinity))

(5)

This formula seems to be correct .
Now how to make a plot ?
Hardy's Z(t) function shows the not trivial zeros in the upperhalfplane of the critical strip of the Riemann zeta function  as zeros in this Z(t) real function : derived from a alternating serie ?

Download priem_staircase_en_riemann_functie.mw

I wish to solve a diffrential equation of the type:

u(du/dx)^2=a_1*u^4+a_2*u^3+a_3*u^2+a_4*u+a_5

where coefficients a_1,a_2,...are constants with respect to x.

I am trying to convert this equation in normal Weirstrass Form.

Can someone please help

restart

NULL

Is there a direct way to have the int command return the anti-derivative plus an arbitrary constant of integration? I am imagining the process to look like:
int(f(x), x) = F(x)+c1

NULL

Consider the integral of f(x)=x.f := x

x

(1)

Int(f, x); int(f, x)

(1/2)*x^2

(2)

Notice that the output has no intregration constant or the constant has been assigned the value of zero and is not displayed in the output.

Maple 2021 Help states, "Indefinite integration  is performed if the second argument x is a name. Note that no constant of integration appears in the result. Definite integration is performed if the second argument is of the form x=a..b where a and b are the endpoints of the interval of integration."

I'd like Maple to output the anti-derivative plus an arbitrary constant in the same way dsolve outputs a general solution of an ode with arbitrary constants. My first work around was to just use dsolve.  

There is a sense in which performing an integration is equivalent to solving an ode:
diff(h(x), x) = g(x); int(diff(h(x), x), x) = int(g(x), x); h(x) = int(g(x), x)+c1; h(x) = G(x)+c2
    

Is there a way to force int to output arbitrary constants of integration or should I stick to just using dsolve if I want that effect?

Download constants_of_integration_int_output.mw

As an engineer and not a mathematician, I'm interested most often in getting symbolic solutions to various equations.  But when I enter an equation, say, for |a| where a is a complex equation for the frequency response of a filter, Maple simply returns "|a|".  Well, I knew that!  What I want is the symbolic equation of the magnitude of the frequency response, not a parroting of what I just typed.  I have yet to find the command that will give me this.  The help file is less than helpful in this regard.  "How do I ..." seems focused on obtaining numerical solutions, not symbolic solutions, for example.  I find that it's usually much quicker to just do the math on paper.

restart:with(LinearAlgebra):with(plots):with(geometry):with(plottools): On appelle alpha la moitié de l'angle de rotation de la roue menée par tour de roue menante. alpha=Pi/n en radians? soit Pi/8 pour 8 rainures.. On a alors les relations suivantes entre l'entaxe E, le rayon de la roue ùenante R1 et le rayon de la roue menée R2 : R1=E.sin(alpha), R2=E*cos(alpha) Intersection du cercle (O,R2) avec la droite tan(phi)x-r/cos(phi), on obtient les coordonnées de P3 sol:=allvalues(solve([tan(phi)*x-r/cos(phi)=y,y^2+x^2=R2^2],[x,y])): Intersection de 2 cercles sol1:=allvalues(solve([(x-E)^2+y^2=(R-a)^2,y^2+x^2=R2^2],[x,y])): Coordonnées des points du pourtour de l'élément de croix Oo:=point([0,0]): phi:=Pi/8:R2:=5:r:=1/4:E:=R2/cos(phi):evalf(%):R:=R2*tan(phi):evalf(%):a:=0.5: P1:=point([(R2/2-r)*cos(phi),(R2/2-r)*sin(phi)]): P2:=point([(R2/2)*cos(phi)+r*sin(phi),(R2/2)*sin(phi)-r*cos(phi)]): xP2:=(R2/2)*cos(phi)+r*sin(phi):yP2:=(R2/2)*sin(phi)-r*cos(phi): xP1:=(R2/2-r)*cos(phi):yP1:=(R2/2-r)*sin(phi): Equation paramétrique du segment OP1 (t varie de 0 à 1) ; x1:=t*(0-xP1)+xP1: y1:=t*(0-yP1)+yP1: n1:=5: dt:=1/(n1-1):#t varie entre 0 et 1 for i to n1 do tau:=(i-1)*dt: xx[i]:=evalf(subs(t=tau,x1)): yy[i]:=evalf(subs(t=tau,y1)): #print(i,xx[i],yy[i]); od: Equation paramétrique du quart de cercle P1P2 de la rainure (t varie de 0 à 1) x2:=R2/2*cos(phi)+r*cos(t):#attention au sens de rotation du parcours de l'objet y2:=R2/2*sin(phi)+r*sin(t): n2:=6: dt:=Pi/2/(n2-1):#arc de Pi/2 for i to n2 do tau:=phi-Pi+(i-1)*dt: xx[i]:=evalf(subs(t=tau,x2)): yy[i]:=evalf(subs(t=tau,y2)): od: for i to n2 do Vector[row]([i,xx[i],yy[i]]) od: droite:=plot((tan(phi)*x-r/cos(phi),x=0..3),linestyle=dot,color=blue): sol[1]: xP3:=evalf(subs(op(1,sol[1]),x)):yP3:=evalf(subs(op(1,sol[1]),y)): xP2:yP2: xP4:=evalf(subs(op(1,sol1[1]),x)):yP4:=evalf(subs(op(1,sol1[1]),y)): xP5:=E-(R-a):yP5:=0: x3:=t*(xP3-xP2)+xP2: y3:=t*(yP3-yP2)+yP2: n3:=10: dt:=1/(n3-1):#t varie entre 0 et 1 for i to n3 do tau:=(i-1)*dt: xx[i+n2]:=evalf(subs(t=tau,x3)): yy[i+n2]:=evalf(subs(t=tau,y3)): od: for i to n3 do Vector[row]([i,xx[i],yy[i]]) od: x4:=xP5+R-a+(R-a)*cos(t):#attention au sens de rotation du parcours de l'objet y4:=(R-a)*sin(t): n4:=11: eta:=arcsin(yP4/(R-a)): dt:=(-eta)/(n2-1)/2:#arc de Pi/2 for i to n4 do tau:=(Pi+eta)+(i-1)*dt:#recherche de tau ? xx[i+n2+n3]:=evalf(subs(t=-tau,x4)): yy[i+n2+n3]:=evalf(subs(t=-tau,y4)): od: for i to n4 do Vector[row]([i,xx[i],yy[i]]) od: n:=n2+n3+n4; n := 27 for i to n do Vector[row]([i,xx[i],yy[i]]) od: figure:=NULL: for i from 0 to n do xx[0]:=0:yy[0]:=0: figure:=figure,[xx[i],yy[i]]: #print(i,xx[i],yy[i]); od: polygonplot([figure],scaling=constrained,color=yellow,view=[-0.1..5,-0.1..3]): for i to n do X[i]:=xx[i]: Y[i]:=yy[i] od: d1:=plottools[disk]([xP1,yP1],0.05,color=blue): d2:=plottools[disk]([xP2,yP2],0.05,color=red): d3:=plottools[disk]([xP3,yP3],0.05,color=green): d4:=plottools[disk]([xP4,yP4],0.05,color=green): d5:=plottools[disk]([xP5,yP5],0.05,color=green): fig:=pointplot([figure],scaling=constrained): Po:=pointplot([[xP1,yP1],[xP2,yP2],[xP3,yP3]],color = blue, symbol = asterisk): Cir:=plot([R2*cos(t),R2*sin(t),t=0..Pi/2],color=black): Arc:=plot([E+(R-a)*cos(t),(R-a)*sin(t),t=3*Pi/4..Pi],linestyle=dot,color=blue): textplot({[1, 2, "one point in 2-D"], [3, 2, "second point in 2-D"]}): texte:=textplot([[xP1-0.2,yP1,"P1"],[xP2,yP2-0.3,"P2"],[xP3+0.2,yP3+0.2,"P3"], [xP4+0.2,yP4+0.1,"P4"],[xP5-0.2,yP5+0.2,"P5"]]): display({Arc,Cir,d1,d2,d3,d4,d5,Po,fig,droite,texte},scaling=constrained,view=[-1..7,-1..6]): with(plottools): printlevel:=3: Miroir : symétrie par rapport à l'axes des x for i from 0 to n/2 do tt:=yy[i]: yy[i]:=yy[n-i+1]: yy[n-i+1]:=tt: tt:=xx[i]: xx[i]:=xx[n-i+1]: xx[n-i+1]:=tt od: for i from 0 to n-1 do xx[2*n-i]:=xx[i]: yy[2*n-i]:=-yy[i]: #print(i,xx[i],yy[i]) od: Poly:=NULL: for i from 0 to 2*n-1 do xx[0]:=0:yy[0]:=0: Poly:=Poly,[xx[i],yy[i]]:od: polygonplot([Poly],color=yellow,scaling=constrained): pointplot([Poly],color = blue, scaling=constrained,symbol = asterisk,view=[-1..5,-3..3]): Rotation unassign('xt','yt'): #gc(): zt:=8:#8 rainures ou faisceaux xt:=Vector(63,[]): yt:=Vector(63,[]): xt:=Vector((2*n-1),zt,[]): yt:=Vector((2*n-1),zt,[]): j:=0: for k from 0 to zt-1 do j:=0: phi:=2*Pi*k/zt: cs:=cos(phi): sn:=sin(phi): for kk from 1 to 2*n-1 do j:=j+1: xt[j][k]:=evalf(xx[kk]*cs-yy[kk]*sn): yt[j][k]:=evalf(xx[kk]*sn+yy[kk]*cs): od: od: N1:=j: points:=seq(seq([xt[i][j], yt[i][j]], j=0..zt-1), i=1..2*n-1): p_cross:= pointplot([points], scaling = constrained, color = black,linestyle=solid, filled=[yellow]): polygonplot([points], color = yellow, scaling = constrained); NULL; display([p_cross]);#How to draw this cross with a line without points. Thank you.

Hello everyone . I wish you all a happy new year and a great 2022.

i have a project in Maplesim and i just began working with it .

my project is about the creation of an umbrella using maple sim . I tried my best to create one of the mechanic system of the revolute system . But in an umbrella there are 8 system of a revolute , and it depends of the orientation . I don't knew how to create the other 7 system 

Can you please help me ?

Oussama

First 229 230 231 232 233 234 235 Last Page 231 of 2308