MaplePrimes Questions

what is the wrong in this operations for isentropic process ( isentropic-process) 

 

Restart: with(RealDomain) : interface(dispalyprecision=4) : ; Isentropical := proc(N,v) local K,PTR,KM1,KP1,GO, M,MS,C,PPT,TTT,RRT,AAS,eq,o ; K : = G() : KM1 : = k - 1 : KP1 : = K + 1 : GO := 1 : If N=1 then M := v Elif N=2 then PPT := v : M := sqrt ( 2 * (PPT^(-KM/K) -1 ) : Elif N=3 then MS := v : M := sqrt ( 1 / (KP1/ (2*MS^2) –KM1/2 ) : Elif N=4 then C := v : M := sqrt ( 2 / (KM1* (1 /(C^2) -1 )) ) : Elif N=5 then TTT := v : M := sqrt ( 2 * (1/TTT-1 ) / KM1 : Elif N=6 then RRT := v : M := sqrt ( 2 * (1/RRT^KM1 -1 ) / KM1 : Elif N=7 then AAS := v : eq :=AAS- (2*(1+KM1*M^2/2)/ KP1) ^ (KP1/ (2*KM1)) /M : M := fsolve(eq,M,0..1) : GO :=2 : Elif N=8 then AAS := v : eq :=AAS- (2*(1+KM1*M^2/2)/ KP1) ^ (KP1/ (2*KM1)) /M : M := fsolve(eq,M,1..infinity) : GO :=2 : Fi:fi GO<>2 then ASS := (2 *(1+ KM1*M^2/2/KP1) ^ (KP1/ (2*KM1)) /M fi: PTR := (1+ KM1*M^2/2/KP1) : PPT := PTR^(-K/KM1) : TTT:=PTR^ (-1) : RRT:+PTR^(-1/KM1) : If N <> 3 then MS := sqrt ( KP1 / ( 2 / ( M^2)+KM1) ) If N <> 3 then C := sqrt( 1 / (2 / (KM1*M^2) + 1 ) ) O := evalf([m,1./PPT,MS,C,1./TTT,1./RRT,AAS]) end : irp := proc (N, v) local f; f:=Isentropic1(N,v) : printf(cat(`% 9.4f `$7, ` \ n`) , f[ii$ii=1..7]) end : G := ( ) -> 1.4 : For mi form .1 to .5 do irp(1.mi) od : > > > Eq := table( [ (M2) = M2 , (MS2) = (K+1) /2 (2 / ( M2)+ (K-1) ) (C2) = 1 / (2 / (K-1)*M2+1 ) (PP0) = (1+(K-1)*M2/2)^(-K/(K-1) ) (RR0) = (1+(K-1)*M2/2)^(-1/(K-1) ) (TT0) = (1+(K-1)*M2/2)^(-1) (AAS) = (2 *(1 +(K-1)*M2/2 ) / (K+1) )^( (k-1) /(2*(k-1)))/ squt(M2) ]) : if vL=M then M2v := solve ( M2 -Eq[M2 ] , M2 ) : M2v := eval(M2v ,M2 = VR^2 ) : elif vL=MS then M2v := solve( M2 -Eq[MS2 ] , M2 ) : M2v := eval(M2v ,MS2 = VR^2 ) : elif vL=C then M2v := solve( M2 -Eq[C2 ] , M2 ) : M2v := eval(M2v ,C2 = VR^2 ) : elif vL=PP0 then M2v := solve( M2 -Eq[PP0] , M2 ) : M2v := eval(M2v ,PP0 = VR ) : elif vL=RR0 then M2v := solve( M2 -Eq[RR0] , M2 ) : M2v := eval(M2v ,RR0 = VR ) : elif vL=TT0 then M2v := solve( M2 -Eq[TT0] , M2 ) : M2v := eval(M2v ,TT0 = VR ) : elif vL=AASsub then M2v := fsolve( M2 -Eq[AAS] , M2 ) : M2 :=0..1 : elif vL=AASup then M2v := fsolve( M2 -Eq[AAS] , M2 ) : M2 :=1..infinity : fi: Eqsva1 := eva1(Eq, M2 = M2v) : Eqava1 [M] := sqrt(EqsVa1[M2] ) : Eqsva1[MS] := sqrt(EqsVa1[MS2] ) : Eqava1 [C] := sqrt(EqsVa1[C2] ) : 1var := [M, MS, C, PP0, RR0, TT0, AAS] : [seq(1var[i]=EqsVA1[1var[i] ] , I=1…nope(1var))] end: Egs :=[M=0.5, MS=0.53452, C=0.2182, P0P=0.84302, RR0=0.88517, TT0=0.95238, AASsub=1.33985, AASsup=0.95238] : For i from 1 to nops(Egs) do print(I,Isentropic2(Egs[i])) od : (process)

I have functions with sin(x) and  cos(x) terms with x values are degrees.

How to calculate sin(30 degree)?

How to insert degree symbol in maple?

Suppose evaluate  sin(Pi/2), my out put becomes sin(Pi/2)...How to solve this problem?

Hi,

Idea for trigonometric animation like this? Thanks

Please I need help with my proc.

 

> RK2skritt:=proc(FR::procedure,xo,yo,vxo,vyo,h) local x, y, vx, vy, r, kx1, kx2, kx3, kx4, ky1, ky2, ky3, ky4, l x1, l x2, l x3, l x4, ly1, ly2, ly3, ly4, tmp; r:=sqrt(xo*xo+yo*yo); tmp:=-(h*FR(r))/(r); lx1:=h*vxo; ly1:=h*vyo; kx1:=tmp*xo; ky1:=tmp*yo; lx2:=h*(vxo+0.5*kx1); ly2:=h*(vyo+0.5 ky1); r:=sqrt((xo+0.5*lx1)^(2)+(yo+0.5*ly1)^(2)); tmp:=-(h*FR(r))/(r); kx2:=tmp*(xo+0.5*lx1); ky2:=tmp*(yo+0.5*ly1); lx3:=h*(vxo+0.5*kx2); ly3:=h*(vyo+0.5*ky2); r:=sqrt((xo+0.5*lx2)^(2)+(yo+0.5*ly2)^(2)); tmp:=-(h*FR(r))/(r); kx3:=tmp*(xo+0.5*lx2); ky3:=tmp*(yo+0.5*ly2); lx4:=h*(vxo+kx3); ly4:=h*(vyo+ky3); r:=sqrt((xo+lx3)^(2)+(yo+ly3)^(2)); tmp:=-(h*FR(r))/(r); kx4:=tmp*(xo+lx3); ky4:=tmp(yo+ly3); x:=xo+(lx1+2*lx2+2*lx3+lx4)/(6); y:=yo+(ly1+2*ly2+2*ly3+ly4)/(6); vx:=vxo+(kx1+2*kx2+2*kx3+kx4)/(6); vy:=vyo+(ky1+2*ky2+2*ky3+ky4)/(6); [x,y,vx,vy]; end proc: Error, invalid local declaration Please someone help me!!!!!!!!

in maple after fitting an equation (A + B.x) in the experimental data, how to assign to parameters A and B the adjusted values will be assigned in the equation?

 

Thanks

I have a surface described by the equation.

f := (x, y) -> 3*(1 - x)^2*exp(-x^2 - (y + 1)^2) - (2*x - 10*x^3 - 10*y^5)*exp(-x^2 - y^2) - 1/3*exp(-(x + 1)^2 - y^2)

with(plots):
plot3d(f(x,y),x=-3..3,y=-3..3,orientation=[-40,60,0])

If a drop of water were put at point f(0.2,1.4), how would we draw a line to follow it's path?  (is that the gradient curve?)

I expect the output for the following code to be a Matrix containing 720 and a Matrix containing 21. What I get is a Matrix containing x^6 and one containing 21, which shows an unexpected difference between the parameter evaluation rule for Matrix products and that for Matrix sums. Is there a good reason for this, or is it a bug? Do any other binary operators between rtables also show this weirdness? 

proc(n::nonnegint) 
local x, q, v:= <<x>>, s:= <<0>>, p:= <<1>>; 
   for x to n do p:= p.v; s:= s+v od; 
   p, s 
end proc(6);

 

Why does the following code return a vector containing x rather than containing 1 and how can I correct it?

proc() local x, v:= <x>; x:= 1; rtable_eval(v) end proc();

My actual goal is to have a Matrix with a parameter inside a procedure and to create different instantiations of the Matrix in a loop by changing the parameter. 

What is the problem with the initialconsiditions that caused this error?

"Error, (in dsolve/numeric/DAE/initial) missing initial conditions for the following: {Integer}"

Thanks.

Hi

I use Maple 2016.

The following command calculates semicircle perimeter, but it returns infinity.

`assuming`([int(sqrt(1+(diff(sqrt(R^2-(x-R)^2), x))^2), x = 0 .. 2*R)], [R > 0])

I am running a for loop which for some loop index may give error message but it is fine for me to go with next loop indexes. but maple stop after the error message. How can I make maple to run even after the error message. Thank you

Can I do something like it?

Hi, 

I am trying to solve 1 equation with goniometric functions so I know the range (0..2*Pi), but it just doesnt solve it (though it solved similar ones before).

fsolve(3.*10^6 = sqrt((-4.2*10^14*(-1.*10^7*u*cos(u) + 3.84*10^8)/((-1.*10^7*u*cos(u) + 3.84*10^8)^2 + 1.*10^14*u^2*sin(u)^2)^(3/2) + 4.2*10^21*u*cos(u)/((-1.*10^7*u*cos(u) + 3.84*10^8)^2 + 1.*10^14*u^2*sin(u)^2)^(3/2))^2 + 7.056*10^43*u^2*sin(u)^2/((-1.*10^7*u*cos(u) + 3.84*10^8)^2 + 1.*10^14*u^2*sin(u)^2)^3), u, u = 0 .. 2*Pi)

Is there some way to get the solution?

Thank you in advance

 

Hello,

I have a problem in solving a differential equation in maple. I got an error which is "unexpected occurence of the variables..." .  I have uploaded my full problem as a pdf and maple worksheet (mw) files.

Untitled_(4).pdf

Prob.mw

Hi,

What is the derivative of the composed Bessel function BesselJ(alpha, sqrt(u^2+v^2-2*uv*cos(phi))) with respect to u?

BesselJ(alpha, sqrt(u^2+v^2-2*uv*cos(phi))) is a composed function of the form f(g(u)) with f=BesselJ(u) and g=sqrt(u^2+v^2-2*uv*cos(phi)).

Best regards

First 638 639 640 641 642 643 644 Last Page 640 of 2434