Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hope this is a simple question to answer but how do you use units and show 1 of something without losing the 1.  For example, it's easy enough to show 3 hours as 3h but nobody writes 1 hour as "h".  It's just silly.  Is there a way for 1 hour to render as "1h"?  Really the question is can you get 1 of any unit to show as "1 unit" and not just "unit"? Thanks.

Hi!

I am trying to implement the algorithms given in this paper (free for download) in Maple 2015

https://www.researchgate.net/publication/374636058_A_simple_algorithm_for_computing_a_multi-dimensional_the_Sierpinski_space-filling_curve_generalization

Such algorithms, apparently very easy, provides an approximation of  a sapce-filling curve and its pseudo-inverse. I am interesting in this space--filling curve for its properties. Please, find attached the Maple file, I am not sure if the code of the paper is not fine or I am doing something wrong. 

Many thanks un advsnce for your help

Sierp_v1.mw

 

p1>0, p2<0 and x[0] are arbitrary constants. How can i solve this integral? 

 

   I want to see    

thanks in advance. 

Hi,

First of all, I'm beginner in Maple. 
I want to plot  "M" versus "kc" and "deltah" as a 3D curve (M is real and positive). Intervals of kc and deltah are  given (see attached file). These three parameters (i.e, M,kc,deltah) should satisfiy the following equation:
Eq=-(1-(deltab+deltah))-(1-(deltab+deltah))/(kc-3/2)-deltah/sigmah-deltah/(sigmah*(kh-3/2))-(1/6)*deltab*sqrt(3)*mu*(1/sqrt((M-u0b+sqrt(3)*sqrt(mu*sigmab))**2)+1/sqrt((M-u0b-sqrt(3)*sqrt(mu*sigmab))**2))/sqrt(mu*sigmab)-(1/6)*sqrt(3)*(1/sqrt((M+sqrt(3)*sqrt(sigmai))**2)-1/sqrt((M-sqrt(3)*sqrt(sigmai))**2))/sqrt(sigmai)=0.

Other parameters are as follows:
 kh=3, sigmah=4,sigmab=1,u0b=0.05,sigmai=1/300,deltab=1e-6,mu=1836.
3D.mw

How to solve and plot a ODE system in RK method.
eq1 := diff(f(x), x, x, x)-(1/2)*Sc*sin(alpha)*g(x)*(diff(g(x), x, x))+(1/2)*x*cos(alpha)*(diff(f(x), x, x))+(1/2)*sin(alpha)*f(x)*(diff(f(x), x, x)) = 0; eq2 := (diff(g(x), x, x, x))/Pm+(1/2)*x*cos(alpha)*(diff(g(x), x, x))+sin(alpha)*f(x)*(diff(g(x), x, x))-sin(alpha)*(diff(f(x), x, x))*g(x) = 0; eq3 := (diff(theta(x), x, x))/Pr+(1/2)*x*cos(alpha)*(diff(theta(x), x))+(1/2)*x*(diff(f(x), x))*(diff(theta(x), x))+sin(alpha)*(x*(diff(f(x), x))-f(x))*(diff(theta(x), x))-Nb*(diff(s(x), x))*(diff(theta(x), x))-Nt*(diff(theta(x), x))^2+(1/4)*Sc*Br*sin(alpha)^2*(diff(f(x), x))^2*(x*(diff(g(x), x))-g(x))+(diff(g(x), x))^2*(x*(diff(f(x), x))-f(x)) = 0; eq4 := diff(s(x), x, x)+S*((1/2)*cos(alpha)*x*(diff(s(x), x))+(1/2)*sin(alpha)*f(x)*(diff(s(x), x)))+Nt*(diff(theta(x), x, x))/Nb = 0

ics := f(0) = 0, (D(f))(0) = 1, g(0) = 0, (D(g))(0) = 1, theta(0) = 1, s(0) = 1; bcs := (D(f))(100) = 0, (D(g))(100) = 0, theta(100) = 0, s(100) = 0

alpha = - 30 degree, Sc = 1.0, Pm = .1, Pr = 6.2, Nb = .1, Nt = .1, Br = .5, S = 1

Hi

I would like to create/import a list from a text-file. The text-file "example.txt" has the following structur:

1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 12
11 14

On every line are two numbers, separated by a space. The list should contain only the second number, in this example

L:=[1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14].

The original text-file has 12615 lines, the biggest number is around  3.126 * 10^139.

Thanks for your help.

Was working with some antenna design equations and noticed that in a certain plot definition, the addition of gridlines changes the shape of the plotted curve.  Is this a bug or is there something obvious here that I am overlooking?  This one really has me scratching my head.  The only difference between the two plots below is the addition of the gridline spec.

Many thanks!

gridlines_change_plot.mw

Hello everyone,

I'm currently exploring the properties of a sum in Maple, and I was wondering how to obtain the values of the following sum:

sum 1/(i*j*k*) such that 1<=i+j+k<= n 

I'm interested in the values of this sum for a given n. How can I express this efficiently in Maple?

Thanks in advance for your help!

Hi, I have an homework where I need to find the highest point and the lowest point on an ellipse form by the intersection of two equations wich are 4x-3y+8z=5 and z^2=x^2+y^2 and I have to use the LagrangeMultiplier command. I get how it works but I can't get the correct form. How should I do it ? 

To celebrate this day of mathematics, I want to share my favourite equation involving Pi, the Bailey–Borwein–Plouffe (BBP) formula:

This is my favourite for a number of reasons. Firstly, Simon Plouffe and the late Peter Borwein (two of the authors that this formula is named after) are Canadian! While I personally have nothing to do with this formula, the fact that fellow Canadians contributed to such an elegant equation is something that I like to brag about.

Secondly, I find it fascinating how Plouffe first discovered this formula using a computer program. It can often be debated whether mathematics is discovered or invented, but there’s no doubt here since Plouffe found this formula by doing an extensive search with the PSLQ integer relation algorithm (interfaced with Maple). This is an example of how, with ingenuity and creativity, one can effectively use algorithms and programs as powerful tools to obtain mathematical results.

And finally (most importantly), with some clever rearranging, it can be used to compute arbitrary digits of Pi!

Digit 2024 is 8
Digit 31415 is 5
Digit 123456 is 4
Digit 314159 is also 4
Digit 355556 is… F?

That last digit might look strange… and that’s because they’re all in hexadecimal (base-16, where A-F represent 10-15). As it turns out, this type of formula only exists for Pi in bases that are powers of 2. Nevertheless, with the help of a Maple script and an implementation of the BBP formula by Carl Love, you can check out this Learn document to calculate some arbitrary digits of Pi in base-16 and learn a little bit about how it works.

After further developments, this formula led to project PiHex, a combined effort to calculate as many digits of Pi in binary as possible; it turns out that the quadrillionth bit of Pi is zero! This also led to a class of BBP-type formulas that can calculate the digits of other constants like (log2)*(π^2) and (log2)^5.

Part of what makes this formula so interesting is human curiosity: it’s fun to know these random digits. Another part is what makes mathematics so beautiful: you never know what discoveries this might lead to in the future. Now if you’ll excuse me, I have a slice of lemon meringue pie with my name on it 😋

 

References
BBP Formula (Wikipedia)
A Compendium of BBP-Type Formulas
The BBP Algorithm for Pi

Is it possible overlay one column graph on top of another ? And if, how do I do it?

Regards

I have here a function  
                           "sin(x)/x"

and suppose sin(x)/x = 0 
Can I now use MapleAI to retrieve the correct command for this in Maple..could I?

The intersection points with the x-axis are positive and negative multiples of Pi
I have put these in an ordered list, but Maple gives this:
For x domain = -20...20 
X := {x = Pi}, {x = 2*Pi}, {x = 3*Pi}, {x = 4*Pi}, {x = 5*Pi}, {x = 6*Pi}, {x = -6*Pi}, {x = -5*Pi}, {x = -4*Pi}, {x = -3*Pi}, {x = -2*Pi}, {x = -Pi};

 
X := sort(eval~(x, [X]));
 X := [, -6 Pi, -5 Pi, -4 Pi, -3 Pi, -2 Pi, -Pi, 2 Pi, 3 Pi, 4 Pi, 5 Pi, 6 Pi]


A strange ranking that Maple comes up with ? 

with(NaturalLanguage);
        [Explain, GetCommand, GetMath, Query, RawQuery]



GetCommand("give for Maple solve command all options?");
            "solve(equations, variables, options);"

Explain("give for Maple solve command all options?");

"Maple is a symbolic and numeric computing environment. Its 

   "solve" command is used to find solutions (roots) of a given 

   equation or a system of equations.
  

  There are a number of options (or "parameters") which can be 

   specified in this command to alter its behavior:

  

  1. `Allsolutions`: This option makes Maple to generate all 

   possible solutions of an equation.

  

  2. `Real`: This option only provides the real solutions. If 

   equations do not have real solutions, it will return an 

   empty set.

  

  3. `Positive`: It only includes positive solutions in the 

   output.

  

  4. `explicit`: If specified, Maple attempts to isolate roots 

   and provide an explicit solution for each variable.

  

  5. `assume = real`: This option restrict the solutions to 

   only real numbers.

  

  6. `parametric`: This option allows Maple to write the 

   solutions in a parametric form. 

  

  7. `avoid ={x = a}`: This option makes solve exclude the 

   possibility `x = a` as a solution.

  

  8. `MaxDegree = d`: This option allows you to limit the 

   degree of the polynomial equations to be considered.

  

  9. `maxdepth = d`: This sets a limit on recursive depth to 

   which the computation should go to seek a solution.

  

  10. `multiplicities`: This option reports multiplicity of the 

   roots.

  

  11. `solutions = vars`: This option tells Maple to look for 

   solutions for specific variables.

  

  12. `numeric`: This option makes solve find a numeric 

   solution to the equation.

  

  13. `symbolic`: This option makes solve find a symbolic 

   solution to the equation.

  

  14. `simplify`: This option simplifies the solutions returned 

   by solve.

  

  15. `sqrt`: This option allows square roots in the output.

  

  It is important to note that not all options are suited for 

   use with all types of equations. Also, the "solve" command 

   in Maple can be occasionally limited by the complexity of 

   the equation, and may sometimes fail to find solutions that 

   more specialized software or methods can find."



 

 

I am trying to solve the following set of equations, I am able to find solutions for a simplified case (b=0) using the command solve but cannot seem to solve it for general b.

Is there a better way to attempt to find a solution?
solve.mw

restart

eqn := [(2*((q*r*a3^2-(1/2)*b^2*a3^2-(1/2)*r^2*a3^2-(1/2)*a2^2)*b^4*cos(theta)^4+(2*((q*r-(1/4)*b^2-(1/4)*r^2)*(b^2+r^2)*a4^2*sin(theta)^2-(1/2)*r^4*a3^2+q*r^3*a3^2+(1/2)*(1/2-b^2*a3^2+(1/2)*a1^2-a2^2)*r^2-(1/2)*q*(a1^2+1)*r+(1/4)*b^2*(a1^2+1)))*b^2*cos(theta)^2+2*r*(q^2*sin(theta)^4*b^2*r*a4^2-2*a4*((1/8)*a4*r^5-(1/4)*q*a4*r^4+(1/4)*b^2*a4*r^3-(1/2)*q*b*a1*r^2+b*((1/8)*b^3*a4+q^2*a1)*r+(1/4)*q*b^3*(a4*b-2*a1))*sin(theta)^2-(1/4)*r^5*a3^2+(1/2)*q*r^4*a3^2+(1/4)*(-a3^2*b^2+a1^2-a2^2+1)*r^3+q*(-a1^2-1/2)*r^2+((1/4)*b^2*(a1^2+1)+q^2*a1^2)*r-(1/2)*q*b^2*a1^2)))/((r^2+b^2*cos(theta)^2)*(-b^2+2*q*r-r^2)), (2*((q*r*s3^2-(1/2)*b^2*s3^2-(1/2)*r^2*s3^2-(1/2)*s2^2)*b^4*cos(theta)^4+(2*((q*r-(1/4)*b^2-(1/4)*r^2)*(b^2+r^2)*s4^2*sin(theta)^2-(1/2)*r^4*s3^2+q*r^3*s3^2+(1/2)*(1/2-b^2*s3^2+(1/2)*s1^2-s2^2)*r^2-(1/2)*q*(s1^2+1)*r+(1/4)*b^2*(s1^2+1)))*b^2*cos(theta)^2+2*r*(q^2*sin(theta)^4*b^2*r*s4^2-2*s4*((1/8)*r^5*s4-(1/4)*q*r^4*s4+(1/4)*b^2*r^3*s4-(1/2)*q*b*r^2*s1+b*((1/8)*b^3*s4+q^2*s1)*r+(1/4)*q*b^3*(b*s4-2*s1))*sin(theta)^2-(1/4)*r^5*s3^2+(1/2)*q*r^4*s3^2+(1/4)*(-b^2*s3^2+s1^2-s2^2+1)*r^3+q*(-s1^2-1/2)*r^2+((1/4)*b^2*(s1^2+1)+q^2*s1^2)*r-(1/2)*q*b^2*s1^2)))/((r^2+b^2*cos(theta)^2)*(-b^2+2*q*r-r^2)), (2*((1/2)*s2*sqrt(b^4*cos(theta)^4+8*q*sin(theta)^2*b^2*r+2*b^2*cos(theta)^2*r^2+r^4)+(q*r-(1/2)*b^2-(1/2)*r^2)*(b*sin(theta)^2*s4+s1)))/(-b^2+2*q*r-r^2), (2*((1/2)*a2*sqrt(b^4*cos(theta)^4+8*q*sin(theta)^2*b^2*r+2*b^2*cos(theta)^2*r^2+r^4)+(q*r-(1/2)*b^2-(1/2)*r^2)*(b*sin(theta)^2*a4+a1)))/(-b^2+2*q*r-r^2), (sqrt(b^4*cos(theta)^4+8*q*sin(theta)^2*b^2*r+2*b^2*cos(theta)^2*r^2+r^4)*n2+(2*(1+sin(theta)^2*b*n4+n1))*(q*r-(1/2)*b^2-(1/2)*r^2))/(-b^2+2*q*r-r^2), (2*(b^4*(q*s3*r*a3-(1/2)*s3*b^2*a3-(1/2)*s3*r^2*a3-(1/2)*a2*s2)*cos(theta)^4+(2*((q*r-(1/4)*b^2-(1/4)*r^2)*(b^2+r^2)*s4*a4*sin(theta)^2-(1/2)*s3*r^4*a3+q*s3*r^3*a3+(1/2)*(-s3*b^2*a3+(1/2)*a1*s1-a2*s2)*r^2-(1/2)*q*r*a1*s1+(1/4)*b^2*a1*s1))*b^2*cos(theta)^2+(2*(q^2*s4*sin(theta)^4*b^2*r*a4+(-(1/4)*s4*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3^2)*r^9-(1/8)*((1/2)*b^2+q^2)*(s3-a3)*(s3+a3)*r^8-(1/8)*((-a3^2+s3^2)*b^2+(1/4)*a1^2+(1/4)*a2^2-(1/4)*s1^2-(1/4)*s2^2)*q*r^7+((1/32)*(a3^2-s3^2)*b^4+q^2*(-a3^2+s3^2)*b^2+(1/8)*q^2*(a1^2-s1^2))*r^6-(1/8)*(4*b^4*(-a3^2+s3^2)+((1/2)*a1^2+3*a2^2-(1/2)*s1^2-3*s2^2)*b^2+q^2*(a1^2-s1^2))*q*r^5+q^2*((-a3^2+s3^2)*b^2+(1/8)*s1^2-(1/8)*a1^2)*b^2*r^4+((1/4)*(a3^2-s3^2)*b^4+(1/8)*(-a2^2+s2^2+(1/4)*s1^2-(1/4)*a1^2)*b^2+q^2*(a1^2-s1^2))*q*b^2*r^3+q^3*b^4*(a1-s1)*(a1+s1)*r-(1/4)*q^2*b^6*(a1-s1)*(a1+s1))))/(sqrt(b^4*cos(theta)^4+8*q*sin(theta)^2*b^2*r+2*b^2*cos(theta)^2*r^2+r^4)*(r^2+b^2*cos(theta)^2)^3*(-b^2+2*q*r-r^2)^2)]

solve(eqn, {a1, a2, a3, a4, n1, n2, n3, n4, s1, s2, s3, s4})

``

NULL


 

Download solve.mw

 

In many special cases, generalized hypergeometric functions can be transformed into other (possibly less general) functions, but sometimes Maple fails to convert some of them to other functions when possible.
For instance, 

4*hypergeom([1, 1], [2, 3, 7/2], -(x/2)**2) - 
 35*hypergeom([1, 1], [2, 5/2, 3], -(x/2)**2) - 
 2*hypergeom([1, 1], [3, 3, 7/2], -(x/2)**2) + 
 10*hypergeom([1, 1], [5/2, 3, 3], -(x/2)**2): # which is, in fact, “360*((Ci(x) - ln(x) + 19/18 - gamma)/x**2 - sin(x)/x**3 + (cos(x) + 5/3)/x**4 - 8/3*sin(x)/x**5)” 
expand(%);
 = 
RealDomain:-expand(4*hypergeom([1, 1], [2, 3, 7/2], -(x/2)**2) - 35*hypergeom([1, 1], [2, 5/2, 3], -(x/2)**2) - 2*hypergeom([1, 1], [3, 3, 7/2], -(x/2)**2) + 10*hypergeom([1, 1], [5/2, 3, 3], -(x/2)**2))


simplify(%);
RealDomain:-simplify(4*hypergeom([1, 1], [2, 3, 7/2], -(x/2)**2) - 35*hypergeom([1, 1], [2, 5/2, 3], -(x/2)**2) - 2*hypergeom([1, 1], [3, 3, 7/2], -(x/2)**2) + 10*hypergeom([1, 1], [5/2, 3, 3], -(x/2)**2))


Is it possible to obtain a non-hypergeometric form of it? E.g., 

Here are more examples that `simplify/hypergeom` (as well as expand) is unable to deal with: 

  1. hypergeom([1, 1, 3/2], [5/2, 5/2, 3, 3], -(x/2)**2):
  2. hypergeom([1, 1], [5/2, 3, 3], -(x/2)**2):
  3. hypergeom([1, 1], [3/2, 2, 2], -(x/2)**2):
  4. hypergeom([3/2], [5/2, 5/2], -(x/2)**2):
  5. … (to be continued) 

I have read something like How to simplify this hypergeometric function? - MaplePrimes, yet those tricks do not appear to work here. Is there any workaround? 

Edit. There seems to be a bug in `simplify/hypergeom`: 

'hypergeom([-1/3, 1/3, -1/2 - m, -m], [1/2, 1/3 - m, 2/3 - m], 1)':
simplify(`%`, hypergeom) assuming m::nonnegint;
 = 
                               -1
                               --
                               2 

simplify(eval(`%%`, m = 0), 'constant');
 = 
                               1

The expected result should be a piecewise function. 

Hello. I'm trying to model the pharmacodynamics of salicylic acid with two body comportants, SA1 and SA2. At t=1, I wish to inject a single pulse of salicylic acid in the system, so that the variable Inj is equal to Dose for t=1 and equal to zero for any other time t.

But dsolve doesn't seem to take into account this "ifelse" nature of Inj, and as a result, it yields the wrong solution where SA1 and SA2 remain at the initial condition zero throughout. How can I fix this? Here's my code:

restart;

k12:=0.0452821;
k21:=0.0641682;
k1x:=0.00426118;
Dose:=484;
Inj:=ifelse(t=1,Dose,0);

ode_sys:=diff(SA2(t),t)=SA1(t)*k12-SA2(t)*k21,diff(SA1(t),t)=Inj-k1x*SA1(t);

ics:=SA2(0)=0,SA1(0)=0;

Solution1:=dsolve({ode_sys,ics},{SA1(t),SA2(t)},type=numeric);

plots:-odeplot(Solution1,[[t,SA1(t),color="red",thickness=1],[t,SA2(t),color="blue",thickness=1]],t=0..500,labels=["Time t","Salicylic acid"],labeldirections=[horizontal,vertical]);

It finds a solution where SA1 and SA2 remain zero throughout, whereas due to the single pulse of salicylic acid, they should be non-zero.

I also tried: Solution1:=dsolve({ode_sys,ics},{SA1(t),SA2(t)},type=numeric,parameters=[Inj=ifelse(t=1,Dose,0)]); but here I get an error message

Can you help? Many thanks. I'm still learning Maple with the book "Mathematische Probleme lösen mit Maple", and now also with the site gould.prof/learning-maple

 

2 3 4 5 6 7 8 Last Page 4 of 2097