MaplePrimes Questions

I noticed that something changed with the output of translating abs() to latex. I am not sure when this happened.

Current version use \mid ...\mid  instead of the original \left| .... \right|

The problem with \mid is that the spacing no longer symmetric. It generate too much space on one side of | compared to the other side, and makes the output not pretty any more.

Is it possible to revert this back to the original way it was done? Please see example

restart;
Latex(ln(abs(1+x))=x)

                     \ln \! \left({\mid 1+x \mid}\right) = x

latex(ln(abs(1+x))=x)

                   \ln  \left(  \left| 1+x \right|  \right) =x

The second example gives better looking Latex where the space is symmetric. Here is the output

\documentclass{book}
\usepackage{amsmath}
\begin{document}          
\[
\ln \! \left({\mid 1+x \mid}\right) = x
\]

\[
\ln \! \left(  \left| 1+x \right|  \right) =x
\]
\end{document}

The second output is much better since \left|...\right| automatically sets the spacing the same between them and the math on each side.  (same if \lvert and \rvert were used)

I just noticed this first time looking at current output. I do not think this is how it used to be, else I would probably seen it before.

I am using Maple 2020.2 and Physics 890 (latest).

If not possible to change back to \left| ... right| . may be a new configuration parameter could be added to alow a user to choose which one?

Window 10.

 

Hi, 

Working with Legendre Polynomials (LegendreP) I observed that solve doesn't find the correct number of zeros.
More precisely, for N > 17, solve(LegendreP(N, x)) finds less zeros than N.

I wrote a procedure based on a theorem about the intertwined location of the zeros of orthogonal polynomial of successive degrees. So this problem is not blocking, but I would like to understand while solve(LegendreP(N, x)) doesn't always do the job.

Thanks in advance.
 

restart:

Z := n -> op~(2, { allvalues(solve(LegendreP(n,x))) } );

proc (n) options operator, arrow; `~`[op](2, {allvalues(solve(LegendreP(n, x)))}) end proc

(1)

Digits:=10:
Z(17):
numelems(%);

17

(2)

Z(18):
numelems(%);

16

(3)

Digits:=15:
Z(18):
numelems(%);

16

(4)

Digits:=20:
Z(18):
numelems(%);

15

(5)

Zf := n -> op~(2, { allvalues(solve(evalf(LegendreP(n,x)))) } );
Z(18):
numelems(%);

proc (n) options operator, arrow; `~`[op](2, {allvalues(solve(evalf(LegendreP(n, x))))}) end proc

 

15

(6)

# Let z[N][i] the ith zero of any orthogonal polynomial P(N,x) of degree N.
#
# It is known that each open interval(z[N][i], z[N][i+1]) contains
# exactly a unique zero of the of P(N+1,x).

Z17 := [ -1, Z(17)[], 1]:
Z18 := NULL:
for n from 1 to 18 do
  Z18 := Z18, fsolve(LegendreP(18,x),  x=Z17[n]..Z17[n+1]);
end do:
numelems({Z18})

18

(7)

# A procedure to compute zeros of LegendreP up to degree N


zeros := proc(N)
  local zeros_table, Z, n, p, z:
  zeros_table := table([0=[]]):
  Z := [-1, 1]:
  for n from 1 to N do
    z := NULL:
    for p from 1 to n do
      z := z, fsolve(LegendreP(n,x),  x=Z[p]..Z[p+1]);
    end do;
    zeros_table[n] := [z]:
    Z := [-1, z, 1]
  end do;
  return zeros_table
end proc:


 

Download LegendreP_zeros.mw

This ode

ode:=diff(y(x),x)=sqrt(1-y(x)^2)

has general solution y(x) = sin(x + _C1) but it also has solution y=-1 and y=+1. Since these extra solutions can't be obtained from the general solution by specific value of the constant of integration, they are singular solution.

But I am not able to get Maple to show these:

restart;
ode:=diff(y(x),x)=sqrt(1-y(x)^2);    
dsolve(ode);
dsolve(ode,'singsol'='all',[separable]);
dsolve(ode,[separable]);

We can check that y=1.,y=-1 are solutions

odetest(y(x)=1,ode);
odetest(y(x)=-1,ode);

0
0

Only after I used this, was Maple able to gives these solutions

dsolve(ode,'Lie');
dsolve(ode,'Lie',singsol=all);

So only when using `Lie` symmetry methods and also using singsol=all it worked.

Most people will not think of using this specialized option.

Why Maple did not give these singular solutions using the standard dsolve(ode,singsol=all) command?

Should it not have done so? Now it makes it more confusing as to which option to use to obtain the singular solution, as one might have to keep trying different options.

What do others think? 

Maple 2020.2

I used dsolve to solve the Initial value problems numericaly.
When I set the parameter range=1..5*10^4 , it works and cost only about 200s cpu time.
But if I set range=1..2*10^5, it stop running ( cpu time stop) when the mserver memory reach about 1.5 G. (the memory record in the bottom-right of maple interface is about 700M .)

What is the reason please?  

Hello. I want to use the command verify but with two variables. For example:

verify(x^2 + y^2, 0, {'greater_equal'});

but I get FAIL as an answer. I tried adding before the verify command assume(x, 'real'); assume(y, 'real');

but notihng changed.

 

Thanks for any help.

I need help for designing a procedure for Schubert Kronecker polynomial program in maple.

I am trying to solve this type of problem:

I thought I could double check my answers by creating a RandomVariable and calculating the probablity using the Probability function.

But from the RandomVariables documentation,  it seems only univariate random variables are supported.

Is there really no way to define a RandomVariable given a joint distribution?

so i have a little school laptop and maple on it works just fine. Then i have my all powerful gaming desktop with an AM RTX 3700x ,RTX 2070S, SSD and 32GB ram.

I have never seen maple run so slow on any pc as i have on my desktop. It is completely impossible to use maple. Just writing normal input like 123 takes forever. One thing i have noticed is evertime i do some sort of action, then the icons to the left slowly go from being colored to grey and back to colored before i can do a new action.

The two images below show an example here you can see it is about to go from being colored to being grey, when i try to mark stuff. I have tried to install the x64 and x86 version, i have tried giving it 4096 ram in the ini file and i have tried removing splash. Nothing works....

 

This is the last step of my calculation. I get  following system of equations:

s:={a__11 = -b__1^2 + 5/4, a__12 = -b__1*b__2 + 7/4, a__13 = -b__1*b__3 - 1/2, a__14 = -b__1*b__4 - 1/2, a__15 = -b__1*b__5 - 1/2, a__16 = -b__1*b__6 - 1/2, a__17 = -b__1*b__7 - 1/2, a__22 = -b__2^2 + 5/4, a__23 = -b__2*b__3 - 1/2, a__24 = -b__2*b__4 - 1/2, a__25 = -b__2*b__5 - 1/2, a__26 = -b__2*b__6 - 1/2, a__27 = -b__2*b__7 - 1/2, a__33 = -b__3^2 - 1, a__34 = -b__3*b__4 + 1, a__35 = -b__3*b__5, a__36 = -b__3*b__6, a__37 = -b__3*b__7 + 1, a__44 = -b__4^2 - 1, a__45 = -b__4*b__5 + 1, a__46 = -b__4*b__6, a__47 = -b__4*b__7, a__55 = -b__5^2 - 1, a__56 = -b__5*b__6 + 1, a__57 = -b__5*b__7, a__66 = -b__6^2 - 1, a__67 = -b__6*b__7 + 1, a__77 = -b__7^2 - 1, b__1 = b__1, b__2 = b__2, b__3 = b__3, b__4 = b__4, b__5 = b__5, b__6 = b__6, b__7 = b__7}

 

I want to solve this system of equations

solve(s,{a__11, a__12, a__13, a__14, a__15, a__16, a__17, a__22, a__23, a__24, a__25, a__26, a__27, a__33, a__34, a__35, a__36, a__37, a__44, a__45, a__46, a__47, a__55, a__56, a__57, a__66, a__67, a__77, b__1, b__2, b__3, b__4, b__5, b__6, b__7})

 

But I  didn't get any more valuable information 

Actually I'd like to  know if there is no  real solution.

If there is a real number solution,   one is enough for me.

Any help would be greatly appreciated

 

contour.mw

I'm having trouble executing the following contour plot.

I'm attaching my file. Kindly Help!

Hello there, 

Would you allow me to ask this question?

What would be a way to simplify the expression 'eq9_32a' below to the 'Desired' expression?

Intuitively, the numerator and denominator can be divided by 'sqrt(r^2 + 1)', but the 'Simplify' instruction did not do that. 
 

restart;

eq9_30 := T__e_n = 2*(s/s_hat) / ((1+r*s/s_hat)^2+(s/s_hat)^2);

T__e_n = 2*s/(s_hat*((1+r*s/s_hat)^2+s^2/s_hat^2))

(1)

eq9_31 := solve(diff(rhs(eq9_30), s)=0,s);

s_hat/(r^2+1)^(1/2), -s_hat/(r^2+1)^(1/2)

(2)

eq9_32a :=  T__e_np = simplify(subs(s=eq9_31[1] , rhs(eq9_30))) assuming r::real;

T__e_np = (r^2+1)^(1/2)/(r^2+(r^2+1)^(1/2)*r+1)

(3)

Desired := T__e_np = 1/(sqrt(r^2 + 1) + r);

T__e_np = 1/((r^2+1)^(1/2)+r)

(4)

 


Merry Christmas!

Download Q20201208.mw

Dear All,

We consider the polynomial 

P(x)=(x+1)(x+2)...(x+n)

Question The Coefficient of x2 in Pn.

Hi, 

A few times ago a trainee asked me this question
         "given a matrix formula, can Maple find the transpose of this formula?"

More precisely, let's say E, A, B and C are four (abstract) matrices (let's say symbols) with consistent dimensions such that E = A+B*C, can Maple "find" that ET = AT + CT * BT (where  ET represents the transpose of E)?

I come back to this problem regularly because the trainee was quite frustrated by my negative answer (note she had the same request form the inverse of a matrix formula).

The best I'm capable to do is given in the attached file (transposition only).
This seems to work correctly even if did not do intensive testing.

Do you have any ideas on how to implement the transposition and inversion computation rules in Maple?
For example, given 

E := A &* B^(-1))

Maple would return 

Transpose(E);
      (B^(-1))^T &* A^T 
# or better   E^(T) = (B^T)^(-1) &* A^T
# and 
Inverse(E);
   B &* A^(-1)


Thanks in advance for you involvement
 

restart:

Transpose := proc(e)
  local tr, t:

  tr := `#mo("т")`:

  define(
    t,
    t(`&*`(a::anything, b::anything)) = &*(b^tr, a^tr),
    t(a::anything+b::anything)=a^tr+b^tr,
    t(a^tr)=a,
    'linear', 'flat'
  ):
 
  t(expand(e));

  return eval(%, map(u -> (u^tr)^tr = u, indets(e, name)));
end proc

proc (e) local tr, t; tr := `#mo("т")`; define(t, t(`&*`(a::anything, b::anything)) = `&*`(b^tr, a^tr), t(a::anything+b::anything) = a^tr+b^tr, t(a^tr) = a, 'linear', 'flat'); t(expand(e)); return eval(%, map(proc (u) options operator, arrow; (u^tr)^tr = u end proc, indets(e, name))) end proc

(1)

Transpose(A+B)

B^`#mo("т")`+A^`#mo("т")`

(2)

Transpose(2*A + B &* C)

2*A^`#mo("т")`+`&*`(C^`#mo("т")`, B^`#mo("т")`)

(3)

Transpose((A + B) &* (A + B))

`&*`(A^`#mo("т")`, A^`#mo("т")`)+`&*`(B^`#mo("т")`, A^`#mo("т")`)+`&*`(A^`#mo("т")`, B^`#mo("т")`)+`&*`(B^`#mo("т")`, B^`#mo("т")`)

(4)

Transpose((A + B) &* Transpose(A + B) + Transpose(Transpose(A)) )

`&*`(B, A^`#mo("т")`)+`&*`(A, A^`#mo("т")`)+`&*`(B, B^`#mo("т")`)+`&*`(A, B^`#mo("т")`)+A^`#mo("т")`

(5)

 


 

Download transposition.mw

Hi and Welcome Everyone here.

It is my first post and I am happy to have Maple 2020 Personal Edition. It is great tool and I am still learning.

Durng first weeks I solved many things with help and forums but I can't solve this simple one below:

How to force maple to divide a sqrtof (4*n^2 + 5*n - 7) by n to have each expression divided separately and all still inside of sqrt?

sqrt(4*n^2 + 5*n - 7)/n to get:sqrt(4 + 5/n - 7/n^2) by collect or expand function or anything else. I was able to do it by rewriting combine(((4*n^2 + 5*n - 7)/n^2)^0.5, radical) in such form but it is not what I want to have since I need to rewriting it manually.

Can any "wizard of maple" help me to find an answer? Or at least give a hint in what direction to go, I will dig later myself.

Regards

Marcin

 

At the moment t=0, we place a body at 100 ° C in a room at 25°C; we designate by q(t) the temperature at the moment t. The differential equation is.q'(t)+k*(q(t)-25)=t, with k cooling coefficient equal to 2.
Determine the solution that checks the initial condition.
What is the body temperature after 30 minutes.
After how long the temperature drops to 50°C. Thank you for the help.

First 345 346 347 348 349 350 351 Last Page 347 of 2308