Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

     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

I see a number of MaplePrimes questions answered with good examples using prefix notation.  Is there good reference material somewhere that can show me how to make use of prefix notation when using Maple?  It's not always obvious (to me) how to construct maple commands using prefix operators so I typically just use the standard commands.  Understanding Maples prefix notation would help in understanding some of the answers given to questions in this forum.  Thanks.

Question is attached:

I describe in words the problem I want to solve with Maple. I'll need to work with random variables.

I want to compute Var[A+B+C] where A, B, and C are not independent of each other. In particular, I don't know how to compute Cov[A,B], Cov[A,C], and Cov[B,C]. The model specifications follow.

Let:

A = X__1*(-lambda__1*X__1-lambda__1*delta__1+nu__1-nu__01);
B = X__2*(-lambda__2*X__2-lambda__2*delta__2+nu__2-nu__02);
A = X__3*(-lambda__3*X__3-lambda__3*delta__3+nu__1+nu__2-nu__01-nu__02);

A = X__1*(-X__1*lambda__1-delta__1*lambda__1-nu__01+nu__1)

 

B = X__2*(-X__2*lambda__2-delta__2*lambda__2-nu__02+nu__2)

 

A = X__3*(-X__3*lambda__3-delta__3*lambda__3-nu__01-nu__02+nu__1+nu__2)

(1)

where lambda__1, lambda__2, and lambda__3 are constants. Moreover, nu__01 is the mean of nu__1~N(nu__01,sigma__nu^2)
and nu__02 is the mean of nu__2~N(nu__02,sigma__nu^2). Note that nu__1 and nu__2 have the same variance and are independent of each other.

In addition:

X__1 = beta__1*(nu__1+nu__2-nu__01-nu__02)+alpha__1*delta__1+alpha__2s*delta__2;
X__2 = beta__2*(nu__1+nu__2-nu__01-nu__02)+alpha__2*delta__2+alpha__1s*delta__1;
X__3 = beta__3*(nu__1+nu__2-nu__01-nu__02)+alpha__3*delta__3;

X__1 = beta__1*(nu__1+nu__2-nu__01-nu__02)+alpha__1*delta__1+alpha__2s*delta__2

 

X__2 = beta__2*(nu__1+nu__2-nu__01-nu__02)+alpha__2*delta__2+alpha__1s*delta__1

 

X__3 = beta__3*(nu__1+nu__2-nu__01-nu__02)+alpha__3*delta__3

(2)

where beta__1, beta__2, beta__3, alpha__1, alpha__2, alpha__3, alpha__1s, alpha__2s are constants. Moreover, delta__1~N(0,sigma__d^2), delta__2~N(0,sigma__d^2), and delta__3~N(0,sigma__d3^2) (note the different variance for delta__3). The variables delta__1, delta__2, and delta__3 are independent of each other. Moreover, nu__1 and nu__2 are independent of delta__1, delta__2, and delta__3.

Now, A, B, C are all products of the form W*Q. In general, Var[W*Q] can be found by applying a formula*** which here reduces to Var[W*Q] = sigma__W^2*sigma__Q^2+(Cov[W,Q])^2, where Cov[W,Q] is simply E[W*Q] since E[W]=0 and E[Q]=0 in my three cases. In short, it's relatively straightforward to find Var[A], Var[B], and Var[C]. However, I don't know about the covariance terms. How to tackle the covariance terms, i.e., Cov[A,B], Cov[A,C], and Cov[B,C]?


***See @whuber's comment in Prof. Dilip Sarwate's answer here https://stats.stackexchange.com/questions/15978/variance-of-product-of-dependent-variables


Perhaps it would be useful to automate the computation of E[A+B+C] as well. However, I managed to compute the expectation by hand, with pen and paper. It would be nice to double check with a script.

Download variance_of_sum_of_products.mw

Want to make a rectangular graph (in the sense of Graph Theory) of 4 copies of the path A-B-C-D i.e. four rows of this path. Once the rectangular or matrix like graph is made its ediges are to be weighted as the matrix position of vertex stating from (1,1) at the upper left vertex i.e. "A". Help please.

Hi everyone! :)

I'm new to Maple, so please forgive me if the solution is obvious, but I could not find any fitting articles for my problem.

I have a transfer function and need to find the poles. Later, I want to calculate the constants to meet my filter requirements. For now, I'm focusing on getting a symbolic solution and evaluating the poles.

Here's my setup:


Here is the File NoiseFilter.mw

 

 

When I use the "evalf" function, it gives me a large sum, but I would like to get one complex numerical result.

I appreciate any help! :)

I would expect I could do

A := DataSeries([2, 3, 4], datatype = float)
B := DataSeries([1, 3, 19], datatype = float)
min~(A, B)

but the last command gives me 

Error, (in DataSeries:-min) invalid boolean expression: 2.

How do I find the element-wise min (i.e. DataSeries([1,3,4], datatype=float)) of two DataSeries?

This code used to work OK in Maple 2023.2.1 on windows 10. Now it gives this new internal Maple error 

Error, (in property/ConvertRelation) numeric exception: division by zero

I think this is new problem in Maple 2024 as I have not seen it before. Will report it to Maplesoft. Mean while if someone has any workaround other than not using the `is` command will try it.

The following are two worksheets. One using 2023 shows it works OK (no error) and one in Maple 2024 with the new error

203072

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

restart;

203072

r:=1/4*a*(a*x^2+6);
tmp:=-1/x^2+1/2*a+(1/x+1/2*a*x)^2;
is(tmp = r)

(1/4)*a*(a*x^2+6)

-1/x^2+(1/2)*a+(1/x+(1/2)*a*x)^2

true

 

 

Download no_numeric_exception_march_7_2024_version_2023.mw
 

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

restart;

r:=1/4*a*(a*x^2+6);
tmp:=-1/x^2+1/2*a+(1/x+1/2*a*x)^2;
is(tmp = r)
 

(1/4)*a*(a*x^2+6)

-1/x^2+(1/2)*a+(1/x+(1/2)*a*x)^2

Error, (in property/ConvertRelation) numeric exception: division by zero

 

 

Download numeric_exception_march_7_2024_version_2024.mw

I was wondering if this is by design or not. Here is one example., This ode is solved by Maple 2023.2.1 on windows 10. The solution is in terms of DESol though. It takes less than one minute.

In Maple 2024 on same PC, dsolve hangs on it.

If this by design? Since DESol solution is not very useful actually. I was thinking that may be Maple is now trying to return a solution without DESol in it, and that is why it hangs or take long time. I stopped it after 5 minutes. 

Or should I report it to Maplesoft as possible bug?  

Below are 2 worksheets. One using Maple 2023 and one using 2024.

42444

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1684. The version installed in this computer is 1672 created 2024, February 7, 18:34 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2023\Physics Updates\lib\`

ode:=(x + 1)*diff(u(x), x, x)/((x - 1)*cosh(1/(x - 1))) - (1/((x - 1)*cosh(1/(x - 1))) - (x + 1)/((x - 1)^2*cosh(1/(x - 1))) + (x + 1)*sinh(1/(x - 1))/((x - 1)^3*cosh(1/(x - 1))^2) + (-2*x^3 - 2*x^2)*(x + 1)/((x - 1)^2*cosh(1/(x - 1))^2))*diff(u(x), x) + (x + 1)^2*(x^5 + x^4 + 2*x^2*cosh(1/(x - 1)) - 2*x*cosh(1/(x - 1)) - x - 1)*u(x)/((x - 1)^3*cosh(1/(x - 1))^3);

(x+1)*(diff(diff(u(x), x), x))/((x-1)*cosh(1/(x-1)))-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(diff(u(x), x))+(x+1)^2*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*u(x)/((x-1)^3*cosh(1/(x-1))^3)

DEtools:-odeadvisor(ode);

[[_2nd_order, _with_linear_symmetries]]

dsolve(ode); #after about 1 minute...

u(x) = DESol({diff(diff(_Y(x), x), x)-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(x-1)*cosh(1/(x-1))*(diff(_Y(x), x))/(x+1)+(x+1)*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*_Y(x)/((x-1)^2*cosh(1/(x-1))^2)}, {_Y(x)})

 

 

Download dsolve_march_7_2024_maple_2023.mw


restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode:=(x + 1)*diff(u(x), x, x)/((x - 1)*cosh(1/(x - 1))) - (1/((x - 1)*cosh(1/(x - 1))) - (x + 1)/((x - 1)^2*cosh(1/(x - 1))) + (x + 1)*sinh(1/(x - 1))/((x - 1)^3*cosh(1/(x - 1))^2) + (-2*x^3 - 2*x^2)*(x + 1)/((x - 1)^2*cosh(1/(x - 1))^2))*diff(u(x), x) + (x + 1)^2*(x^5 + x^4 + 2*x^2*cosh(1/(x - 1)) - 2*x*cosh(1/(x - 1)) - x - 1)*u(x)/((x - 1)^3*cosh(1/(x - 1))^3);

(x+1)*(diff(diff(u(x), x), x))/((x-1)*cosh(1/(x-1)))-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(diff(u(x), x))+(x+1)^2*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*u(x)/((x-1)^3*cosh(1/(x-1))^3)

DEtools:-odeadvisor(ode);

[[_2nd_order, _with_linear_symmetries]]

dsolve(ode); #hangs

 

 

Download dsolve_march_7_2024_maple_2024.mw

One may easily spot that the symbols “” and “” are missing here and here

These two PDF files were printed officially, so I think they can be considered examples of best practice for the export functionality. Does this mean that this functionality is still defective in the most recent release?

I have an expression Z_val which I would like to rewrite in a compact, more readable form. Assuming that simplify() did its job, I thought of using (1) alias(), and (2) eval() with some combination of my parameters, since such combination occurs repetitively in my expression.

(1) is not particularly useful for my problem at hand. In particular, powers are not recognized and the alias I defined did not substitute the combination in all the places I was expecting to.

(2) is somehow effective but my expression becomes arguably even more complicated.

What else would you suggest?

EDIT:

restart;

local gamma;

gamma

(1)

M := -lambda*(beta^2*(sigma__v^2+sigma__e^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2;
V := simplify((1+(Cov__XY/(sigma__X*sigma__Y))^2)*(sigma__X*sigma__Y)^2);

-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2

 

sigma__X^2*sigma__Y^2+Cov__XY^2

(2)

# Specify the terms, calculated by hand

sigma__X := beta^2*(sigma__v^2+sigma__e^2)+alpha^2*sigma__d^2;
sigma__Y := lambda^2*(beta^2*(sigma__v^2+sigma__e^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(1-2*lambda*beta);
Cov__XY := M;

beta^2*(sigma__e^2+sigma__v^2)+alpha^2*sigma__d^2

 

lambda^2*(beta^2*(sigma__e^2+sigma__v^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(-2*beta*lambda+1)

 

-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2

(3)

V;

(beta^2*(sigma__e^2+sigma__v^2)+alpha^2*sigma__d^2)^2*(lambda^2*(beta^2*(sigma__e^2+sigma__v^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(-2*beta*lambda+1))^2+(-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2)^2

(4)

Z := M-(gamma/2)*V;

-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2-(1/2)*gamma*((beta^2*(sigma__e^2+sigma__v^2)+alpha^2*sigma__d^2)^2*(lambda^2*(beta^2*(sigma__e^2+sigma__v^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(-2*beta*lambda+1))^2+(-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2)^2)

(5)

# Specify lambda, beta, and alpha

l := simplify(-gamma*sigma__e^2*sigma__v^2/(2*(sigma__e^2 + sigma__v^2)) + sigma__v^2*sqrt(gamma^2*sigma__d^2*sigma__e^4 + 4*sigma__e^2 + 4*sigma__v^2)/(2*(sigma__e^2 + sigma__v^2)*sigma__d));
b := simplify(eval(sigma__v^2/((gamma*sigma__e^2 + 2*lambda)*sigma__v^2 + 2*lambda*sigma__e^2), lambda = l));
a := simplify(eval(-lambda*(sigma__e^2 + sigma__v^2)/((gamma*sigma__v^2 + 2*lambda)*sigma__e^2 + 2*lambda*sigma__v^2), lambda = l));

(1/2)*sigma__v^2*(-gamma*sigma__e^2*sigma__d+(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2))/((sigma__e^2+sigma__v^2)*sigma__d)

 

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

 

(1/2)*(gamma*sigma__e^2*sigma__d-(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2))/(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2)

(6)

Z_val := simplify(eval(Z, [lambda = l, beta = b, alpha = a]));

-(1/4)*sigma__d*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__d*sigma__v^2*gamma)/((sigma__e^2+sigma__v^2)^2*(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^2)

(7)

eval(Z_val, gamma = Gamma/sigma__e/sigma__d);

-(1/4)*sigma__d*sigma__v^2*(((-2*Gamma^2*sigma__d^2*sigma__e^2-16)*sigma__v^6+(-6*Gamma^2*sigma__d^2*sigma__e^4-4*Gamma^2*sigma__e^2-48*sigma__e^2)*sigma__v^4-sigma__e^4*(Gamma^4*sigma__d^2*sigma__e^2+4*Gamma^2*sigma__d^2*sigma__e^2+8*Gamma^2+48)*sigma__v^2-4*Gamma^2*sigma__e^6-16*sigma__e^6)*(Gamma^2*sigma__e^2+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__e^2*sigma__d^2+sigma__d^2*(Gamma^2/(sigma__e^2*sigma__d^2)+13)*sigma__e^2)*sigma__e^2*sigma__v^4+8*(3+Gamma^2*sigma__e^2*sigma__d^2+(1/2)*sigma__d^2*(Gamma^2/(sigma__e^2*sigma__d^2)+6)*sigma__e^2)*sigma__e^4*sigma__v^2+sigma__e^6*(Gamma^2+4)*(Gamma^2*sigma__d^2*sigma__e^2+2*sigma__d^2*sigma__e^2+2))*sigma__v^2*Gamma/sigma__e)/((sigma__e^2+sigma__v^2)^2*(Gamma^2*sigma__e^2+4*sigma__e^2+4*sigma__v^2)^2)

(8)

Download expression_to_simplify.mw

chatGPT version used by the new NaturalLanguage package seems to be using chatGPT 3?. I asked it and this what it said

NL:=NaturalLanguage;
NL:-Query("what is your name?");
"As an Artificial Intelligence, I don't have a personal name. However, If 
you're asking how to represent the question \"What is your name?\" in MathML, 
it's actually irrelevant as MathML is used for marking up mathematical notations, 
not regular text or questions. \n\nBut in English, it's as simple 
as just asking \"What is your name?

Then I asked it 

NL:-Query("what version of chatGPT are you?");
"As an AI developed by OpenAI, I don't have a specific version like software 
programs or applications. I get continuous updates and improvements over time. 
However, as of my current operation, I'm based on GPT-3 model.

some questions: It is possible to make it use chatGPT 3.5 or 4.0 with NL?

How is this free to use and without getting a key from openAI? After agreeing to terms fromn the options menu, can one continue to use it for free? I thought chatGPT requires some fee to use. But I could be wrong.  but this is nice to be able to use it this easily from Maple!

Btw, It is still not very good in math. Asked it to first this simple first order ode and got wrong answer

NL:-Query("what is the solution to the differential equation y'(x)+y(x)=sin(x)");
"Sorry, this query was too complicated. Please rephrase and/or try again."

So I tried

NL:-Query("solve the differential equation y'(x)+y(x)=sin(x)");
"The differential equation given is a first order linear 

   ordinary differential equation. 

  

  The general solution can be obtained through the following 

   steps:

  

  1. Identify the homogeneous part of the equation, which is 

   y'(x) + y(x) = 0. The solution of such a homogeneous 

   equation known as the "complementary function" is y_c = 

   e^(-x) * A. where A is an arbitrary constant which will be 

   determined by a specific condition or boundary value.

  

  2. Find a Particular Integral (solution specific to the 

   nonhomogeneous part of the differential equation) which in 

   this case is y_p = -cos(x)

  

  3. Combine the Complementary function and Particular Integral 

   to get a general solution, y(x) = e^(-x) * A - cos(x).

  

  Now let's express the solution in MathML:"


                            (-x)          
                     y x = e     A - cos x

 "Note: Here A is a to-be-determined constant. If the problem 

    was a boundary value or initial value problem, you would 

    substitute the given values into this general solution and 

    solve it for A."


The solution should be

dsolve(diff(y(x),x)+y(x)=sin(x))

                y(x) = -cos(x)/2 + sin(x)/2 + exp(-x)*c__1

 

First 124 125 126 127 128 129 130 Last Page 126 of 2216