Maple Questions and Posts

These are Posts and Questions associated with the product, Maple


Consider the worksheet below.

restart

with(Physics[Vectors])

`dτ_` := -I*z*dz*B__0*x^2*_j/d^2-I*y*dz*B__0*x^2*_k/d^2

-I*z*dz*B__0*x^2*_j/d^2-I*y*dz*B__0*x^2*_k/d^2

(1)

I want to integrate the above expression. The differential is already present in the expression. Currently, I have to manually remove the differential to use the int procedure as below.

`τ_` := int(-I*z*B__0*x^2*`#mover(mi("j"),mo("∧"))`/d^2-I*y*B__0*x^2*`#mover(mi("k"),mo("∧"))`/d^2, z = l .. -l)

(2*I)*y*B__0*x^2*_k*l/d^2

(2)

Since I want to put this operation inside a procedure, this removal of dz needs to happen programatically.


For even more context, dtau is a differential torque. 

I am integrating these infinitesimal torques.

dtau is calculated based on a magnetic field B.

I would like to have a procedure that accepts a field B and computes the torque integral.

Download RemoveDifferential.mw

Hello,

I have plotted psi [1] and psi [2] by using contourplot, but I want to show streamline or Flow nets on curves psi[1] and psi[2].

please help me obtain updated graphs like the attached figure.

Thanks

streamline.mw

Here is a "toy" instance. 
As the title suggests, I would like to simplify the following boolean combinations: (Note that the  should be taken into account.) 

formula__0 := 
 convert(And(
   Non(`xor`(Or(0 >- 0, y ** 3=x), 
     And(((y*x - 0^0)^2 + (y*y - x*x)^2)*(y^2 + x^2) > 
       0, 0 <- (y**3 - x)*(y - x**3)**3, 
      `implies`(y + x*2 >= y ** 3*2 + x**3, 
       Or(y + x < y*y*y + x*x*x)), Not((y**3 - x)*(y - x**3) = 0), 
      0 >= 0), y <> x*x*x))), 'boolean_function'):

Regretfully, the built-in command simplify is unable to simplify : 

simplify(formula__0, assume = real); # only rudimentary simplifications 
 = 



The library function SMTLIB:-Simplify seems to simplify it, but the result is incorrect

(SMTLIB:-Simplify(formula__0) assuming real); # check {y = 1, x = 0} 
 = 
                    /   /   / 3           3\\\
                 And\Not\And\y  = x, y = x ///

The only procedure I can find that is capable of rewriting it appears to be RealDomain:-solve

RealDomain:-solve(formula__0, 'allsolutions'); # see below 
 = 
Warning, solutions may have been lost
    /            3\    /     3       \    /     3        \   
   { x = x, y = x  }, { x = y , y = y }, { y = x , x < -1 }, 
    \             /    \             /    \              /   

      /     3              \    /     3        \   
     { y = x , 0 < x, x < 1 }, { x = y , y < -1 }, 
      \                    /    \              /   

      /     3              \ 
     { x = y , 0 < y, y < 1 }
      \                    / 


Nevertheless, this is more or less overkill, since a complete solution set is somewhat unnecessary, and in practice, an simplified and compact but presumably unsolved form is more applicable to further manipulations. (For example, the simplest form of And(y*y + x*x > 0^0): (over ℝ²) should at least be x2y2>1, yet  simply returns sort(convert(Or,function,map2(`?()`,And,RealDomain[solve](And(y*y+x*x>0^0),[x,y]))),[x,y]), which is definitely unsuitable here.) (A more real example can be found in the Ex3 of this compressed file.)

I believe that this is a common problem; curiously, I cannot find any related questions in this forum. So, are such simplifications (similar to SLFQ) available in Maple? 


 

I have the following expressions:

m^3*r*(cos(theta)^6*a^6-9*cos(theta)^4*a^4*r^2+11*cos(theta)^2*a^2*r^4-(1/3)*r^6)*(cos(theta)^2*a^2-(1/3)*r^2)/(r^2+cos(theta)^2*a^2)^9

m^3*r*(cos(theta)^6*a^6-9*cos(theta)^4*a^4*r^2+11*cos(theta)^2*a^2*r^4-(1/3)*r^6)*(cos(theta)^2*a^2-(1/3)*r^2)/(r^2+cos(theta)^2*a^2)^9

(1)

(a^8*(r^10-10*m*r^9+(5*(a^2+8*m^2))*r^8-80*m^3*r^7+(10*(a^4+12*a^2*m^2+8*m^4))*r^6+(4*(-15*a^4*m-40*a^2*m^3-8*m^5))*r^5+(10*(a^6+12*a^4*m^2+8*a^2*m^4))*r^4+(40*(-a^6*m-2*a^4*m^3))*r^3+(5*(a^8+8*a^6*m^2))*r^2-10*a^8*m*r+a^10)*cos(theta)^8-(1/3)*(28*(-30*sin(theta)^2*a^4*m*r^5*(1/7)+r^10-10*m*r^9+(5*(a^2+8*m^2))*r^8+(40*(-a^2*m-2*m^3))*r^7+(10*(a^4+12*a^2*m^2+8*m^4))*r^6+(32*(-5*a^2*m^3-m^5))*r^5+(10*(a^6+12*a^4*m^2+8*a^2*m^4))*r^4+(40*(-a^6*m-2*a^4*m^3))*r^3+(5*(a^8+8*a^6*m^2))*r^2-10*a^8*m*r+a^10))*a^6*r^2*cos(theta)^6+(14*(-260*sin(theta)^2*a^6*m*r^3*(1/7)+r^10-10*m*r^9+(5*(a^2+8*m^2))*r^8+(40*(-a^2*m-2*m^3))*r^7+(10*(a^4+12*a^2*m^2+8*m^4))*r^6+(4*(-15*a^4*m-40*a^2*m^3-8*m^5))*r^5+(10*(a^6+12*a^4*m^2+8*a^2*m^4))*r^4-80*a^4*m^3*r^3+(5*(a^8+8*a^6*m^2))*r^2-10*a^8*m*r+a^10))*a^4*r^4*cos(theta)^4-4*a^2*(-10*a^8*m*r*sin(theta)^2+r^10-10*m*r^9+(5*(a^2+8*m^2))*r^8+(40*(-a^2*m-2*m^3))*r^7+(10*(a^4+12*a^2*m^2+8*m^4))*r^6+(4*(-15*a^4*m-40*a^2*m^3-8*m^5))*r^5+(10*(a^6+12*a^4*m^2+8*a^2*m^4))*r^4+(40*(-a^6*m-2*a^4*m^3))*r^3+(5*(a^8+8*a^6*m^2))*r^2+a^10)*r^6*cos(theta)^2+(1/9)*r^8*(a^2-2*m*r+r^2)^5)*m^3*r/((r^2+a^2*cos(theta)^2)^9*(a^2-2*m*r+r^2)^5)

(a^8*(r^10-10*m*r^9+5*(a^2+8*m^2)*r^8-80*m^3*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*cos(theta)^8-(28/3)*(-(30/7)*sin(theta)^2*a^4*m*r^5+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+32*(-5*a^2*m^3-m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^6*r^2*cos(theta)^6+14*(-(260/7)*sin(theta)^2*a^6*m*r^3+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4-80*a^4*m^3*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^4*r^4*cos(theta)^4-4*a^2*(-10*a^8*m*r*sin(theta)^2+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2+a^10)*r^6*cos(theta)^2+(1/9)*r^8*(a^2-2*m*r+r^2)^5)*m^3*r/((r^2+cos(theta)^2*a^2)^9*(a^2-2*m*r+r^2)^5)

(2)

The two expressions are the same because:

simplify(m^3*r*(cos(theta)^6*a^6-9*cos(theta)^4*a^4*r^2+11*cos(theta)^2*a^2*r^4-(1/3)*r^6)*(a^2*cos(theta)^2-(1/3)*r^2)/(r^2+a^2*cos(theta)^2)^9-(a^8*(r^10-10*m*r^9+5*(a^2+8*m^2)*r^8-80*m^3*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*cos(theta)^8-(28/3)*(-(30/7)*sin(theta)^2*a^4*m*r^5+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+32*(-5*a^2*m^3-m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^6*r^2*cos(theta)^6+14*(-(260/7)*sin(theta)^2*a^6*m*r^3+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4-80*a^4*m^3*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^4*r^4*cos(theta)^4-4*a^2*(-10*a^8*m*r*sin(theta)^2+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2+a^10)*r^6*cos(theta)^2+(1/9)*r^8*(a^2-2*m*r+r^2)^5)*m^3*r/((r^2+a^2*cos(theta)^2)^9*(a^2-2*m*r+r^2)^5))

0

(3)

But I don't get the expression (1) from (2) with the help of simplify() command:

simplify((a^8*(r^10-10*m*r^9+5*(a^2+8*m^2)*r^8-80*m^3*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*cos(theta)^8-(28/3)*(-(30/7)*sin(theta)^2*a^4*m*r^5+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+32*(-5*a^2*m^3-m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^6*r^2*cos(theta)^6+14*(-(260/7)*sin(theta)^2*a^6*m*r^3+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4-80*a^4*m^3*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^4*r^4*cos(theta)^4-4*a^2*(-10*a^8*m*r*sin(theta)^2+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2+a^10)*r^6*cos(theta)^2+(1/9)*r^8*(a^2-2*m*r+r^2)^5)*m^3*r/((r^2+a^2*cos(theta)^2)^9*(a^2-2*m*r+r^2)^5))

(a^8*(r^10-10*m*r^9+5*(a^2+8*m^2)*r^8-80*m^3*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*cos(theta)^8-(28/3)*(-(30/7)*sin(theta)^2*a^4*m*r^5+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+32*(-5*a^2*m^3-m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^6*r^2*cos(theta)^6+14*(-(260/7)*sin(theta)^2*a^6*m*r^3+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4-80*a^4*m^3*r^3+5*(a^8+8*a^6*m^2)*r^2-10*a^8*m*r+a^10)*a^4*r^4*cos(theta)^4-4*a^2*(-10*a^8*m*r*sin(theta)^2+r^10-10*m*r^9+5*(a^2+8*m^2)*r^8+40*(-a^2*m-2*m^3)*r^7+10*(a^4+12*a^2*m^2+8*m^4)*r^6+4*(-15*a^4*m-40*a^2*m^3-8*m^5)*r^5+10*(a^6+12*a^4*m^2+8*a^2*m^4)*r^4+40*(-a^6*m-2*a^4*m^3)*r^3+5*(a^8+8*a^6*m^2)*r^2+a^10)*r^6*cos(theta)^2+(1/9)*r^8*(a^2-2*m*r+r^2)^5)*m^3*r/((r^2+cos(theta)^2*a^2)^9*(a^2-2*m*r+r^2)^5)

(4)

Why not? Is there any solution for this?

 

NULL


 

Download QuestionSimplifyMultivariateRationalFunction.mw

Dear Maple users

I have a question which may seem very simple, but for some reason I have not been able to find a solution to it in Maple:

If plotting a function in Maple by specifying an x-range, but not a y-range, Maple will somehow find a reasonable y-range itself. That's basic stuff. But how do I ensure that this y-range contains the value 0, and Maple still decide the min and max by itself? I could set it myself, but my worksheet require that it is done automatically independent of the given function at hand. 

Erik



(EDITED 2024/03/11  GMT 17H)

In a recent Question@cq mentionned in its last reply "In fact, I wanted to do parameter sensitivity analysis and get the functional relationship between the [...] function and [parameters]. Later, i will study how the uncertainty of [the parameters] affects the [...] function".
I did not keep exchanging further on with @cq, simply replying that I could provide it more help if needed.

In a few words the initial problem was this one:

  • Let X_1 and X_2 two random variables and G the random variable defined by  G = 1 - (X_1 - 1)^2/9 - (X_2 - 1)^3/16.
     
  •  X_1 and X_2 are assumed to be gaussian random variables with respective mean and standard deviation equal to (theta_1, theta_3) and (theta_2, theta_4).
     
  • The four theta parameters are themselves assumed to be realizations of four mutually independent uniform random variables Theta_1, ..., Theta_4 whose parameters are constants.
     
  • Let QOI  (Quantity Of Interest) denote some scalar statistic of G (for instance its Mean, Variance, Skweness, ...).
    For instance, if QOI = Mean(G), then  QOI expresses itself as a function of the four parameters theta_1, ..., theta_4.
    The goal of @cq is to understand which of those parameters have the greatest influence on QOI.


For a quick survey of Sensitivity Analysys (SA) and a presentation of some of the most common strategies see Wiki-Overview


The simplest SA is the Local SA (LSA) we are all taught at school: having chosen some reference point P in the [theta_1, ..., theta_4] space the 1st order partial derivatives d[n] = diff(QOI, theta_n) expressed at point P give a "measure" (maybe after some normalization) of the sensitivity, at point P, of QOI regardibg each parameter theta_n.


A more interesting situation occurs when the parameters can take values in a neighorhood of  P which is not infinitesimal, or more generally in some domain without reference to any specific point P.
That is where Global SA (GSA) comes into the picture.
While the notion of local variation at some point P is well established, GSA raises the fundamental question of how to define how to measure the variation of a function over an arbitrary domain?
Let us take a very simple example while trying to answer this question "What is the variation of sin(x) over [0, 2*Pi]?"

  1. If we focus on the global trend of sin(x)  mean there is no variation at all.
  2. If we consider peak-to-peak amplitude the variation is equal to 2.
  3. At last, if we consider L2 norm the variation is equal to Pi.
    (but the constant function x -> A/sqrt(2) has the same L2 norm but it is flat, and in some sense les fluctuating). 


Statisticians are accustomed to use the concept of variance as a measure to quantify the dispersion of a random variable. At the end of the sixties  one of them, Ilya Meyerovich Sobol’,  introduced the notion of Variance-Based GSA as the key tool to define the global variation of a function. This notion naturally led to that of Sobol' indices as a measure of the sensitivity of a funcion regarding one of its parameters or, which most important, regarding any combination (on says interaction) of its parameters.

The aim of this post is to show how Sobol' indices can be computed when the function under study has an analytic expression.
 

The Sobol' analysis is based on an additive decomposition of this function in terms of 2^P mutually orthogonal fiunctions where P is the number of its random parameters.
This decomposition and the ensuing integrations whose values will represent the Sobol' indices can be done analytically in some situation. When it is no longer the case specific numerical estimation methods have to be used;


The attached file contains a quite generic procedure to compute exact Sobol' indices and total Sobol' indices for a function whose parameters have any arbitrary statistical distribution.
Let's immediately put this into perspective by saying that these calculations are only possible if Maple is capable to find closed form expressions of some integrals, which is of course not always the case.

A few examples are also provided, including the one corresponding to @cq's original question.
At last two numerical estimation methods are presented.

SOBOL.mw

 

 Hello,

  Doing simple calculations I found Maple 2024 and 2023 don't recognize Kronecker delta in the expression

Full worksheet attached. Is there any way to let Maple handle this?

Remaining questions:
1. Doing calculations using Int and value left the result unevaluated eq. (6) and eq. (7) while using int gives 0. Why?
2. Is there possibility to substitute indexed (i.e.) atomic variables like p__m? For example changing by command p__m to p__k.

Thank you in advance,

delta_kron-problem.mw

Hi. I want to plot an sphere animating equator on the sphere(earth). please help me. Tnx.

I have a repetative set of parameter names used in procedures in a package. I settled on making all optional inputs in the format {name::type:=something}. Originally I wanted to use non capitalised names for the optional inputs. But the names clash with Maple commands. I have all sorts of quicky abbreviations like prnt etc. These are both messy and tacky. For many of my choices I would seem to have to use capitalised naming to give a meaningful name. The problem here is these names are used in other Maple packages. So sooner or later there is going to be a clash.

Is there a way a of handling this? Like can I defiine package parameter names? Or should I just stick with my abbreviations?

I read somewhere about this problem in the help years ago. I think Basis was the example used in different packages GroebinerBasis and Polynomial package and using PackageName:-Basis to avoid the clash with both loaded. But that is more a command level handling.

restart

 

illegal:=proc(x,y,{Point:=[symbol=solidcircle,colour=purple]},{Line:=[colour=green,thickness=2]},{Colour:="Blue"},{Scale:=5},{Print:="y"})

print("1 Point= ",Point);  #I currently use points
print("2 Line= ",Line);   #                 linetype
print("3 Colour=  ",Colour); #              clr     this has nothing to do with plotting colour
print("4 Scale= ",Scale);   #               scl   
print("5 Print= ",Print);   #               prnt
Scale*x/y
end proc

 

proc (x, y, { Colour := "Blue", Line := [colour = green, thickness = 2], Point := [symbol = solidcircle, colour = purple], Print := "y", Scale := 5 }) print("1 Point= ", Point); print("2 Line= ", Line); print("3 Colour=  ", Colour); print("4 Scale= ", Scale); print("5 Print= ", Print); Scale*x/y end proc

(1)

illegal(3,7)

"1 Point= ", [symbol = solidcircle, colour = purple]

 

"2 Line= ", [colour = green, thickness = 2]

 

"3 Colour=  ", "Blue"

 

"4 Scale= ", 5

 

"5 Print= ", "y"

 

15/7

(2)

illegal(3,7,line=[linestyle=dash,colour=black,thickness=4])

"1 Point= ", [symbol = solidcircle, colour = purple]

 

"2 Line= ", [colour = green, thickness = 2]

 

"3 Colour=  ", "Blue"

 

"4 Scale= ", 5

 

"5 Print= ", "y"

 

15/7

(3)
 

 

Download 2024-03-09_Illegal_or_Not.mw

I need admin's help
I use evalf(3*21/100,3)=0.630
and evalf(3*89/100,3)=2.67
Is there a way for me to get 2 decimal places
so evalf(3*21/100,3)=0.63?

     On International Women’s Day we celebrate the achievements of women around the world. One inspiring story of women in STEM is that of Sophie Germain (1776-1831), a French mathematician and physicist who made groundbreaking strides in elasticity theory and number theory. She learned mathematics from reading books in her father’s library, and while she was not permitted to study at the École Polytechnique, due to prejudice against her gender, she was able to obtain lecture notes and decided to submit work under the name Monsieur LeBlanc. Some prominent mathematicians at the time, including Joseph-Louis Lagrange and Carl Friedrich Gauss, with whom Germain wrote, recognized her intellect and were supportive of her work in mathematics. 

     Sophie Germain is remembered as a brilliant and determined trailblazer in mathematics. She was the first woman to win a prize from the Paris Academy of Sciences for her contributions in elasticity theory and was among the first to make significant contributions toward proving Fermat’s Last Theorem. Among her many accomplishments, one special case of Fermat’s Last Theorem she was able to prove is when the exponent takes the form of what is now known as a Sophie Germain prime: a prime, p, such that 2p+1 is also a prime. The associated prime, 2p+1, is called a safe prime. 

     To mark International Women’s Day, I’ve created a document exploring the Ulam spiral highlighting Sophie Germain primes and safe primes, as an adaptation of Lazar Paroski’s Ulam spiral document. The image below displays part of the Ulam spiral with Sophie Germain primes highlighted in red, safe primes highlighted in blue, primes that are both a Sophie Germain prime and safe prime highlighted in purple, and primes that are neither in grey. 

  

     The document also contains small explorations of these types of prime numbers. For instance, one interesting property of safe primes is that they must either be 5, 7 or take the form 12k-1 for some k≥1. This can be shown from the fact a safe prime q must equal 2p+1 for some prime, p (a Sophie Germain prime), by definition. Then, since q and p are prime, for q > 7 we can determine through contradiction that q ≡ 3 (mod 4) and q ≡ 5 (mod 6), to conclude q ≡ 11 (mod 12) ≡ -1 (mod 12). And so, q = 12k-1 for some k≥1. The Maple Learn document can be found here along with its Maple script. The document also includes a group where you can test whether some positive integer of your choice, n, is a Sophie Germain prime or a safe prime. Alternatively, given n, a button press will display the next Sophie Germain prime greater than n, using Maple’s NextSafePrime command in the number theory package.  

     In mathematics, there is no shortage of interesting rabbit holes to dive into; many of which are the result of past and present women in mathematics, like Sophie Germain, who have persevered despite their hardships. 

My apologies for such a basic question. But when I do: my_function:=int((t/τ)*exp(-t/τ),t=0..infinity), I get: lim_{t-->∞} (exp(-t/τ))*τ-(t*exp(-t/τ)) + τ, which with simplify I can get to: lim_{t-->∞} (-t + τ)*(exp(-t/τ))+τ

But why doesn't Maple automatically solve this limit to τ? What do I need to do more?

Thank you for your patient help! Mischa

I very welcome this new feature Thumbs up - Free signs icons but here I am stuck

"restart; f(x):=( sin(x))/(x) :  plot(f(x),title=f(x))"

 

solve(f(x) = 0, x, allsolutions); about(_Z1)

Originally _Z1, renamed _Z1~:
  is assumed to be: integer
 

 

SolveTools:-DisplaySolutions(%)

%PIECEWISE([2*Pi*_Z1, ``])

(1)

Questions:
Q1: How to get also the uneven multiples of Pi?
Q2: Why is zero not excluded?
Q3: How to get the desirable output "{  Pi n        n in `&Zopf;` , n<>0"

 

DisplaySolutions.mw

 

 

How to interpret the output to limit()?

restart;
local gamma;

gamma

(1)

A := -sigma__v^2*(((-2*gamma^2*sigma__d^4*sigma__e^4 - 16)*sigma__v^6 + (-6*gamma^2*sigma__d^4*sigma__e^6 - 4*gamma^2*sigma__d^2*sigma__e^4 - 48*sigma__e^2)*sigma__v^4 - sigma__e^4*(gamma^4*sigma__d^6*sigma__e^6 + 4*gamma^2*sigma__d^4*sigma__e^4 + 8*gamma^2*sigma__d^2*sigma__e^2 + 48)*sigma__v^2 - 4*gamma^2*sigma__d^2*sigma__e^8 - 16*sigma__e^6)*sqrt(gamma^2*sigma__d^2*sigma__e^4 + 4*sigma__e^2 + 4*sigma__v^2) + (2*sigma__d^2*sigma__v^8 + (12*sigma__d^2*sigma__e^2 + 8)*sigma__v^6 + 2*(12 + gamma^2*sigma__d^4*sigma__e^4 + sigma__d^2*(gamma^2 + 13)*sigma__e^2)*sigma__e^2*sigma__v^4 + 8*(3 + gamma^2*sigma__d^4*sigma__e^4 + sigma__d^2*(gamma^2 + 6)*sigma__e^2/2)*sigma__e^4*sigma__v^2 + sigma__e^6*(gamma^2*sigma__d^2*sigma__e^2 + 4)*(gamma^2*sigma__d^4*sigma__e^4 + 2*sigma__d^2*sigma__e^2 + 2))*sigma__v^2*gamma*sigma__d)*sigma__d/(4*(sigma__e^2 + sigma__v^2)^2*(gamma^2*sigma__d^2*sigma__e^4 + 4*sigma__e^2 + 4*sigma__v^2)^2);

-(1/4)*sigma__v^2*(((-2*gamma^2*sigma__d^4*sigma__e^4-16)*sigma__v^6+(-6*gamma^2*sigma__d^4*sigma__e^6-4*gamma^2*sigma__d^2*sigma__e^4-48*sigma__e^2)*sigma__v^4-sigma__e^4*(gamma^4*sigma__d^6*sigma__e^6+4*gamma^2*sigma__d^4*sigma__e^4+8*gamma^2*sigma__d^2*sigma__e^2+48)*sigma__v^2-4*gamma^2*sigma__d^2*sigma__e^8-16*sigma__e^6)*(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2)+(2*sigma__d^2*sigma__v^8+(12*sigma__d^2*sigma__e^2+8)*sigma__v^6+2*(12+gamma^2*sigma__d^4*sigma__e^4+sigma__d^2*(gamma^2+13)*sigma__e^2)*sigma__e^2*sigma__v^4+8*(3+gamma^2*sigma__d^4*sigma__e^4+(1/2)*sigma__d^2*(gamma^2+6)*sigma__e^2)*sigma__e^4*sigma__v^2+sigma__e^6*(gamma^2*sigma__d^2*sigma__e^2+4)*(gamma^2*sigma__d^4*sigma__e^4+2*sigma__d^2*sigma__e^2+2))*sigma__v^2*gamma*sigma__d)*sigma__d/((sigma__e^2+sigma__v^2)^2*(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^2)

(2)

# Limits

A__0 := limit(A, gamma = 0);
A__inf_wo_assumptions := limit(A, gamma = infinity);
A__inf_with_assumptions := limit(A, gamma = infinity) assuming 0 < sigma__e, 0 < sigma__v, 0 < sigma__d;

(1/2)*sigma__v^2*sigma__d/(sigma__e^2+sigma__v^2)^(1/2)

 

signum(sigma__d^3*sigma__e^2*sigma__v^4*(-sigma__d*sigma__e^2+(sigma__d^2*sigma__e^4)^(1/2))/(sigma__e^2+sigma__v^2)^2)*infinity

 

0

(3)

Download limits_signum.mw

Was experimenting with methods to handle the representation of 3D lines and plotting them. Where I normally use a point and a direction vector to dascribe the line.

With a bit of experimenting I see the element wise operation `+`~  or  `-`~  using prefix notation saves a lot of time converting vector to lists and vice a versa.  Would be interested to know if there are better techniques.

On the plotting side using plot3d Can the colour of the lines be changed individually? Or should I use a different plotting command?

restart

with(plottools):

l:=([2,-3,1],<3,7/9,6>);   # 3d line point + vector

P:=[7,-8,9]

l := [2, `&ndash;`(3), 1], Vector(3, {(1) = 3, (2) = 7/9, (3) = 6})

 

[7, -8, 9]

(1)

pl:=`+`~(lambda*l[2],l[1]); #3d line as vector eqn

 

Vector(3, {(1) = 3*lambda+2, (2) = (7/9)*lambda-3, (3) = 6*lambda+1})

(2)

vnl:=`-`~(pl,P) ; #vector from Point P to 3D line

 

Vector(3, {(1) = 3*lambda-5, (2) = (7/9)*lambda+5, (3) = 6*lambda-8})

(3)

vnl.l[2] assuming `real` ; #dot product of vectors= 0 when perpendicular

 

(3694/81)*lambda-532/9

(4)

sol:=solve( { (4) }, [lambda] )[];

[lambda = 2394/1847]

(5)

intP:=eval(pl,sol)  #intersection point

Vector(3, {(1) = 10876/1847, (2) = -3679/1847, (3) = 16211/1847})

(6)

l2:=P,eval(vnl,sol) ;  #perpendicular 3D line through P

l2 := [7, `&ndash;`(8), 9], Vector(3, {(1) = -2053/1847, (2) = 11097/1847, (3) = -412/1847})

(7)

pl2:=`+`~(lambda*l2[2],l2[1]); #3D line as vector eqn

Vector(3, {(1) = -(2053/1847)*lambda+7, (2) = (11097/1847)*lambda-8, (3) = -(412/1847)*lambda+9})

(8)

plots:-display(plot3d([pl,pl2],lambda=-.5..1.8,thickness=0,colour=[orange,purple],axes=normal,scaling=constrained),
                point(P,colour=blue ,symbolsize=15,symbol=solidsphere),
                point(l[1],colour=green ,symbolsize=15,symbol=solidsphere),
                point(eval(pl,sol),colour=red ,symbolsize=15,symbol=solidsphere),
                arrow(l,0.2, 0.4, 0.1,colour=green),
                arrow(l2,0.2, 0.4, 0.1,colour=blue));

 

  

 


 

Download Perpendicular_3D_lines.mw

4 5 6 7 8 9 10 Last Page 6 of 2097