MaplePrimes Questions

restart;

with(plots);

a:=0.2; b:=0.2; c:=5.7;

ode1:=diff(x(t),t)=-y(t)-z(t);

ode2:=diff(y(t),t)=x(t)+a*y(t);

ode3:=diff(z(t),t)=b+z(t)*(x(t)-c);

ic1:=x(0)=-0.7;

ic2:=y(0)=-0.7;

ic3:=z(0)=1;

sol:=dsolve({ode1,ode2,ode3,ic1,ic2,ic3},{x(t),y(t),z(t)},numeric,method=classical[rk4],stepsize=0.10,output=listprocedure);
b:=rhs(sol[2]);

c:=rhs(sol[3]);

d:=rhs(sol[4]);

animate (pointplot3d, [ [b(t),c(t),d(t)], symbol=box, color=blue],t=15..100,
background = odeplot(sol, [x(t),y(t),z(t)],t=15..100,numpoints=7000),frames=20);

 

UPD
And "Error, (in plots/animate) incorrect first argument" BUT if i use classic functions (sin,cos,sqrt) instead of b,c,d - all is well.

 

For example [sin(t),cos(t),t/10]

For example [b(t),c(t),d(t)]
Error, (in plots/animate) incorrect first argument

Using latest Physics, I found case where it is not giving the Latex.

Please see attached worksheet.  This is on windows 10, Maple 2020.1.1

 

restart;

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 804 and is the same as the version installed in this computer, created 2020, September 7, 12:31 hours Pacific Time.`

ode:=diff(y(t),t) = -2*arctan(y(t))/(1+y(t)^2);

diff(y(t), t) = -2*arctan(y(t))/(1+y(t)^2)

sol:=dsolve(ode)

t+Intat((1/2)*(_a^2+1)/arctan(_a), _a = y(t))+_C1 = 0

Physics:-Latex(sol)

Error, (in unknown) invalid range for string subscript

latex(sol)

t+\int ^{y \left( t \right) }\!{\frac {{{\it \_a}}^{2}+1}{2\,\arctan
 \left( {\it \_a} \right) }}{d{\it \_a}}+{\it \_C1}=0

 


By trial and error, I found that the error was introduced in Physics 797. Since in Physics 796 it did work.

Here is screen shot

Download latex_issue_11.mw

If I call for the metric (27.27) in Stephani et al. in the Physics package, I expected the null tetrad employed to compute say the Weyl scalars would be the one given in conjunction with (27.27) (equation (27.22) in Stephani et al.). But, Weyl[scalars] returned long expressions for each of the five scalars, whereas with respect to the null tetrad in Stephani et al one expects the first two (or last two) scalars to be zero since the null vector k in their tetrad is the multiple pnd of Weyl. e_[nullvectors] and Setup(tetradmetric=null) followed by e_[ ] seem to output the same null tetrad, which does not appear to be that of Stephani et al. I assume this null tetrad is the null tetrad associated to the orthonomral tetrad that e_[ ]  returns if one hasn't used Setup(tetradmetric=null). How does Maple select this default orthonormal tetrad? What is the best way to set the null tetrad of Stephani et al as the null tetrad to compute Weyl[scalars]?

Here is a simpler example. Calling [27, 37, 1]. Stephani et al give the null tetrad in terms of the spacetime coordinates along with the metric in their equaiton (27.37). After using Setup(tetradmetic=null), e_[ ] returns a tetrad that might, I suppose, be that of Stephani et al. in disguise. Specifically, the tetrad vector defining the null congruence should have only a component with respect to the coordinate r, yet the Maple output gives expressions for the components with respct to the u and r coordinates for both the k and l elements of the null tetrad (while the expressions for the complex element m is exactly what one would expect). As in the previous example, all Weyl scalars are given by nontrivial expressions, even though two of them should be zero (since k is a multiple pnd). So is it the case that the experssions in the Maple output where one expects zero are in fact zero in disguise? The experssions are complicated enough that it is not obvious.  I have uploaded the Maple document for these calculations. SKMHH27_37.mw

I want to series expand the HeunB function. But I am facing some problems with this. please help. Here is the given HeunB function. 

HB1 := HeunB(5/2, -5^(1/4)*(2*M - R)/sqrt((2*M - R)*(4*M - R)), (17*sqrt(5))/10, (3*5^(3/4)*(2*M - R))/(2*sqrt((2*M - R)*(4*M - R))), 5^(1/4)*sqrt((2*M - R)*(4*M - R))*r^2/(2*(2*M - R)*R^2))

 

Here M, R are arbitrary constants.

I can use a whole package in a procedure or a command from a package. 
Writing your own code needs sometimes external code from outside a procedure used ( a package..what else more?)
This i don't find back in the Maple helpfiles easily using external code in procedure  
 

 This old example uses display3d naming what is the same as display ( there is no display3d command in Maple ) 
It gives the error 

diskmethod(f,0,2,10,fig);
Error, (in with) package plots does not export display3d

The disk methode calculates 
V = int(Pi*f(x)^2, x = a .. b)

 The Code for diskmethoddisplay

diskmethod:=proc(f,a,b,N,figure::evaln)
  local X,Y,s,x,dX,i,disk;
  with(plots,display3d);
  X:=array(0..N);Y:=array(1..N);disk:=array(1..N);
  dX:=evalf((b-a)/N);
  X[0]:=a;s:=0;
  for i to N do
    X[i]:=a+i*dX; Y[i]:=evalf(f(X[i]));
    s:=s+evalf(Pi*Y[i]^2*dX);
    disk[i]:=plot3d([x,Y[i]*cos(theta),Y[i]*sin(theta)],
                x=X[i-1]..X[i],theta=0..2*Pi,grid=[2,51]):

  end do;
  figure:= display3d({seq(disk[i],i=1..N)},
            axes=box,projection=0.8,orientation=[-60,70]);
  print(`The approximate volume using`,N,`disks is V =`, s);
end proc:

 

Can anyone help me to draw a zoom picture of any plotted function as shown in the picture??

would like to show a list system one by one and ask question and wait for answer and then plot graph and ask question and wait for answer and then show next system ask question and contiune this for loop

but my script show all system at once but can not one by one and no pop up dialog and no wait for answer

how to do?

 

restart:
interface(prettyprint=2):
with(ListTools):
with(StringTools):
with(ExcelTools):
with(SumTools):
with(Maplets[Elements]):
count := 1:

RR := Import("C:\\Users\\ohungyeeel\\Documents\\EquationsLists.xls", "Candidate", "A1:Q65535"):

for mm from 2 to 20 do

try:
if RR[count,13] = "Complex" or RR[count,13] = "Beautiful system but no result" then
dummy := 0:
else
print(RR[count,1],RR[count,2]):
sol := solve(RR[count,2]):
print("Source:",RR[count,3]):
print("Solution:",sol):

choosesystem := Maplet(InputDialog['ID1']("Choose system?", 'Yes1' = Shutdown(['Yes']), 'No1' = Shutdown(['No']))):
Maplets[Display](maplet):

if choosesystem = "Yes" then
RR[count,15] := "SystemChosenAndSolutionCorrect":
else
RR[count,15] := "NotChosenAndSolutionWrong":
end if:

plot(sol):

choosesystem := Maplet(InputDialog['ID1']("Like and it works?", 'Yes1' = Shutdown(['Yes']), 'No1' = Shutdown(['No']))):
Maplets[Display](maplet):

if choosesystem = "Yes" then
RR[count,16] := "Best":
else
RR[count,16] := "NotSelected":
end if:

end if:

catch:
print("error at ",RR[count,1],RR[count,2]):
end try:

count := count + 1:
od:
Export(RR, "C:\\Users\\ohungyeeel\\Documents\\EquationsLists10092020.xls", "Candidate", "A1"):

eq1 := diff(f(eta), eta, eta, eta, eta)+(2*f(eta)*(diff(f(eta), eta, eta, eta))+2*g(eta)*(diff(g(eta), eta)))*(1-phi)^2.5*(1-phi+phi*rhos/rhof)-sigmanf*M*(diff(f(eta), eta, eta))*(1-phi)^2.5/sigmaf = 0

eq2 := diff(g(eta), eta, eta)-(1-phi)^2.5*(1-phi+phi*rhos/rhof)*(2*(diff(f(eta), eta))*g(eta)-2*(diff(g(eta), eta))*f(eta))-sigmanf*M*g(eta)*(1-phi)^2.5/sigmaf = 0

eq3 := k[nf]*(diff(theta(eta), eta, eta))/(Pr*k[f])+((1-phi+phi*rhos*cps/(rhof*cpf))*2)*f(eta)*(diff(theta(eta), eta))-4*lambda*(1-phi+phi*rhos*cps/(rhof*cpf))*(f(eta)^2*(diff(theta(eta), eta, eta))+f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta)))+sigmanf*M*Ec*((diff(f(eta), eta))^2+g(eta)^2)/sigmaf = 0

eq4 := (1-phi)^2.5*(diff(chi(eta), `$`(eta, 2)))+2*Sc*f(eta)*(diff(chi(eta), eta))-sigma*Sc*(1+delta*theta(eta))^n*exp(-E/(1+delta*theta(eta)))*chi(eta) = 0

Boundary Conditions

f(0) = 0, (D(f))(0) = A1+gamma1*((D@@2)(f))(0), f(10) = 0, (D(f))(10) = 0, g(0) = 1+gamma2*(D(g))(0), g(10) = 0, theta(0) = 1+gamma3*(D(theta))(0), theta(10) = 0, chi(0) = 1, chi(10) = 0

Parameters

lambda = 0.1e-1, sigma = .1, Ec = .2, E = .1, M = 5, delta = .1, n = .1, Sc = 3, A1 = .5, gamma1 = .5, gamma2 = .5, gamma3 = .5, Pr = 6.2, phi = 0.1e-1, rhos = 5.06*10^3, rhof = 997, cps = 397.21, cpf = 4179, k[nf] = .6358521729, k[f] = .613, sigmanf = 0.5654049962e-5, sigmaf = 5.5*10^(-6)

 

 

Here are the inputs and output:

Why is it not possible to simplify the meter and the second (which are units).  If I do "simplify(pmin), the unit MeV becomes J and that is not what I want.  Simply said, is Maplesoft planning to include particle physics where c = h = 1 in the future version of the package "Physics"?

Until that happens, does someone knows how to give the answer in MeV/c.  The preceding problem was asking the mass of a particle in MeV/c^2.

Thank you in advance for your trouble.

Mario Lemelin

Geometry := 2;
if Geometry = 1 then
    f_obj := 4.5;
    f_fluo := 125;
    f_TIE := 45;
    d_sample := f_obj;
    d_max := 250;
    d_cam := f_TIE;
    d_interlens := d_max - d_cam;
end if;
if Geometry = 2 then
    f_obj := 4.5;
    f_fluo := 125;
    f_TIE := 45;
    d_sample := 4.6;
    d_max := 250;
    d_interlens := d_max - d_cam;
end if;
                               2

                              4.5

                              125

                               45

                              4.6

                              250

                          250 - d_cam

TIE := (((((Distance(d_cam)) . (Lens(f_TIE))) . (Distance(d_interlens))) . (Lens(f_obj))) . (Distance(d_sample))) . (Vector(2, [distance, angle]));
           Vector[column](%id = 18446746239510517390)

d_cam_solved := fsolve(coeff(TIE[1], angle, 1), d_cam, d_cam = 20 .. 100);
Error, `,` unexpected

Hello, if I set d_sample to 4.6 then I get "Error, ',' unexpected when I try to find a solution using fsolve. However if I set it to 4.5 then the fsolve computes no problem and I get a solution. Does somebody know if this means fsolve has no solution or have I made a mistake somewhere else? Thanks

Could please help me what is the problem of the following and how I can plot it

restart;
with(LinearAlgebra);
with(plots, implicitplot);
M := Matrix([[sigma + Gamma*ik + 0.5 + 0.5*tanh(c - v) + beta*v, -0.5 + 0.5*tanh(c - v), 0.5*(w - u)*sech^2*(c - v) - beta*u], [-0.5 - 0.5*tanh(c - v), sigma - i*k*Gamma + 0.5 + 0.5*tanh(c - v) + beta*v, 0.5*(u - w)*sech^2*(c - v) - beta*w], [-beta*v, -beta*v, sigma - beta*alpha*(u + w)]]):

Eq := Determinant(M):

alpha := 0.1;
beta := 0.01;
mu := 0.5;
u := 0.5;
v := 1;
Gamma := 0.1;
c := 2;
w := 0.5;

p1r := evalc(Re(Eq)):

p1 := implicitplot(Eq, k = 0 .. 10, sigma = -0.01 .. 0.01);
Error, (in plots/implicitplot) invalid input: the following extra unknowns were found in the input expression: {i, ik}

Hollo everybody,

I want to plot the product u^4*j_{alpha+4}(u)*j_{alpha}(v)??

Or j_{alpha} is the modified Bessel function of the first kind and order alpha.

 

Best regards

Hi,

I'm new to Maplesim and Maple. I've modeled a planar slider-crank mechanism in Maplesim and it works.

Now I want to extract the equations of motion (DAE) for further analysis. From 'Template' --> 'Worksheet', I used A:-GetEquations() to try to get the DAE. However, the equations are too long and not shown. Moreover, I don't know what coordinates Maplesim used to generated those 'unseen' equations. Here are the equations that can be hand-derived:

where I and m represent inertia and mass respectively. Theta, beta and s are the chosen generalized coordiantes, s_theta is sin(theta), c_theta is cos(theta)s_beta is sin(beta), c_beta is cos(beta). Rx and Ry are lagrange multipliers representing the reaction force in the pin between the crank and the connecting rod.

How can I generate such DAEs using Maplesim? Thank you very much.

Hello everyone

I am trying to plot some vectors that have both numeric entries and NA. The vectors represent the root of some function depending on certain parameters (NA means that there is no root for these parameters) and I want to represent the value of the root (vertical) vs the vector that store the variable parameter (horizontal) omitting the values that yield NA. Is there a fast way to do that?

 

Thank you so much in advance

A circle in XOY plane in a 3D axis system
There are two commands :
- spacecurve ( calculus)
- SpaceCurve ( vectorcalculus) 

p1 := plots:-spacecurve([x, sqrt(-x^2 + 1), 0], x = -1 .. 1, color = black, thickness = 5);
p2 := plots:-spacecurve([x, -sqrt(-x^2 + 1), 0], x = -1 .. 1, color = black, thickness = 5);
plots:-display(p1, p2, scaling = constrained, labels = [x, y, z]);

spacecurve plot for circle in parametric form sin(t,cos(t) ?
Spacecurve plot for circle  ( coordinatesystem )? 


 

First 503 504 505 506 507 508 509 Last Page 505 of 2428