## Integral using variable with units....

What is the problem with the integral below when I use a variable n?

=

=

 (1)

 (2)

## Space curve on a 3d plane connecting 2 points...

Dear all, is there a maple call to calculate the space curve connecting two points of a 3d plane?

e.g. the plane is defined by: f(x,y) = -x^2/9 + y^2/4

The two points are: P = (1,2,0), Q=(1,-1,0)

Searched: space curve laying on 3d plane connecting the two points.

Thanks

 >
 >
 >
 (1)
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 >

## Nested square brackets in matrix...

Dear all, in the example below I create a matrix(3x2) and each element contains a vector. How can I avoid the double brackets of the matrix elements or eliminate the double brackets?

Thanks for help

## set up equations and find parameter ...

restart;
with(PolynomialTools);
with(RootFinding);
with(SolveTools);
with(LinearAlgebra);
NULL;
NULL;
E1 := (-alpha*k^2*A[1] - alpha*k^2*B[1] + 3*A[0]^2*A[1]*beta[4] + 3*A[0]^2*B[1]*beta[4] + A[1]^3*beta[4] + 3*A[1]^2*B[1]*beta[4] + 3*A[1]*B[1]^2*beta[4] + B[1]^3*beta[4] + 2*A[0]*A[1]*beta[3] + 2*A[0]*B[1]*beta[3] - w*A[1] - w*B[1])*cosh(xi)^6 + (-alpha*k^2*A[0] + A[0]^3*beta[4] + 3*A[0]*A[1]^2*beta[4] + 6*A[0]*A[1]*B[1]*beta[4] + 3*A[0]*B[1]^2*beta[4] + A[0]^2*beta[3] + A[1]^2*beta[3] + 2*A[1]*B[1]*beta[3] + B[1]^2*beta[3] - w*A[0])*sinh(xi)*cosh(xi)^5 + (2*alpha*k^2*A[1] + alpha*k^2*B[1] - 2*alpha*lambda^2*A[1] + 2*alpha*lambda^2*B[1] - 2*gamma*lambda^2*A[1] + 2*gamma*lambda^2*B[1] - 6*A[0]^2*A[1]*beta[4] - 3*A[0]^2*B[1]*beta[4] - 3*A[1]^3*beta[4] - 6*A[1]^2*B[1]*beta[4] - 3*A[1]*B[1]^2*beta[4] - 4*A[0]*A[1]*beta[3] - 2*A[0]*B[1]*beta[3] + 2*w*A[1] + w*B[1])*cosh(xi)^4 + (alpha*k^2*A[0] - A[0]^3*beta[4] - 6*A[0]*A[1]^2*beta[4] - 6*A[0]*A[1]*B[1]*beta[4] - A[0]^2*beta[3] - 2*A[1]^2*beta[3] - 2*A[1]*B[1]*beta[3] + w*A[0])*sinh(xi)*cosh(xi)^3 + (-alpha*k^2*A[1] + 4*alpha*lambda^2*A[1] + 4*gamma*lambda^2*A[1] + 3*A[0]^2*A[1]*beta[4] + 3*A[1]^3*beta[4] + 3*A[1]^2*B[1]*beta[4] + 2*A[0]*A[1]*beta[3] - w*A[1])*cosh(xi)^2 + (3*A[0]*A[1]^2*beta[4] + A[1]^2*beta[3])*sinh(xi)*cosh(xi) - 2*alpha*lambda^2*A[1] - 2*gamma*lambda^2*A[1] - A[1]^3*beta[4] = 0;
N := 6;
for i from 0 to N do
equ[1][i] := coeff(E1, {cosh(xi)^i, sinh(xi)^i}, i) = 0;
end do;
//        2               2
equ[1][0] := \\-alpha k  A[1] - alpha k  B[1]

2                      2                    3
+ 3 A[0]  A[1] beta[4] + 3 A[0]  B[1] beta[4] + A[1]  beta[4]

2                           2               3
+ 3 A[1]  B[1] beta[4] + 3 A[1] B[1]  beta[4] + B[1]  beta[4]

\
+ 2 A[0] A[1] beta[3] + 2 A[0] B[1] beta[3] - w A[1] - w B[1]/

6   /        2            3
cosh(xi)  + \-alpha k  A[0] + A[0]  beta[4]

2
+ 3 A[0] A[1]  beta[4] + 6 A[0] A[1] B[1] beta[4]

2               2               2
+ 3 A[0] B[1]  beta[4] + A[0]  beta[3] + A[1]  beta[3]

2                 \
+ 2 A[1] B[1] beta[3] + B[1]  beta[3] - w A[0]/ sinh(xi)

5   /         2               2
cosh(xi)  + \2 alpha k  A[1] + alpha k  B[1]

2                      2
- 2 alpha lambda  A[1] + 2 alpha lambda  B[1]

2                      2
- 2 gamma lambda  A[1] + 2 gamma lambda  B[1]

2                      2
- 6 A[0]  A[1] beta[4] - 3 A[0]  B[1] beta[4]

3                 2
- 3 A[1]  beta[4] - 6 A[1]  B[1] beta[4]

2
- 3 A[1] B[1]  beta[4] - 4 A[0] A[1] beta[3]

\         4   /
- 2 A[0] B[1] beta[3] + 2 w A[1] + w B[1]/ cosh(xi)  + \alpha

2            3                      2
k  A[0] - A[0]  beta[4] - 6 A[0] A[1]  beta[4]

2                 2
- 6 A[0] A[1] B[1] beta[4] - A[0]  beta[3] - 2 A[1]  beta[3]

\                  3   /
- 2 A[1] B[1] beta[3] + w A[0]/ sinh(xi) cosh(xi)  + \
2                      2                      2
-alpha k  A[1] + 4 alpha lambda  A[1] + 4 gamma lambda  A[1]

2                      3
+ 3 A[0]  A[1] beta[4] + 3 A[1]  beta[4]

2                                            \
+ 3 A[1]  B[1] beta[4] + 2 A[0] A[1] beta[3] - w A[1]/

2
cosh(xi)

/           2               2        \
+ \3 A[0] A[1]  beta[4] + A[1]  beta[3]/ sinh(xi) cosh(xi)

2                      2            3
- 2 alpha lambda  A[1] - 2 gamma lambda  A[1] - A[1]  beta[4] =

\
0/ = 0

equ[1][1] := 0 = 0

equ[1][2] := 0 = 0

equ[1][3] := 0 = 0

equ[1][4] := 0 = 0

equ[1][5] := 0 = 0

equ[1][6] := 0 = 0

NULL;
NULL;



## Can expression trees and/or DAG be displayed grapi...

Is the a print or plot function that can generate from an expression an expression tree

and/or the corresponding expression DAG

Taken from ?ProgrammingGuide,Chapter02

## Units in manual calculation of expression vs using...

I was just using Maple to do a simple calculation but the units came out all complicated.

The expression in question is work done by a van der Waals gas. The units should come out to Joules per mol.

When I do the calculation manually (second expression below) I do get that result, albeit in more basic units than Joules.

In the first expression, in which I am using subs to sub in values with units into the expression, the final expression is very complicated. Why?

 (1)

How do we simplify the units above so they become the same as the units in the same (manual) calculation below?

 (2)

## avoid the flickering points of an animation...

restart;
Proc := proc(t) local t4, l3, R, r, eq, sol; _EnvHorizontalName := 'x'; _EnvVerticalName := 'y'; t4 := thickness = 4; l3 := linestyle = dot; R := 9; r := 1/2*R; geometry:-point(OO, 0, 0); geometry:-circle(Cir, [OO, R]); geometry:-point(K, R*cos(t), R*sin(t)); geometry:-point(Omega, r*cos(t), r*sin(t)); geometry:-circle(cir, [Omega, r]); eq := geometry:-Equation(cir); geometry:-line(XXp, y = 0); geometry:-line(YYp, x = 0); geometry:-line(L1, y = x); geometry:-line(L2, y = -x); geometry:-projection(M1, K, XXp); geometry:-coordinates(M1); geometry:-point(K2, geometry:-coordinates(M1)[1] - 2*R, 0); geometry:-coordinates(K2); geometry:-segment(sT, K2, M1); geometry:-point(N1, 0, R*sin(t)); subs(y = x, eq); sol := solve(%, x); geometry:-point(N2, sol[2], sol[2]); subs(y = -x, eq); sol := solve(%, x); geometry:-point(N3, sol[2], -sol[2]); plots:-display(geometry:-draw([Cir(color = blue, t4), cir(color = grey, t4), sT(color = black, t4), XXp(color = black, l3), YYp(color = black, l3), L1(color = black, l3), L2(color = black, l3), N1(color = blue, symbol = solidcircle, symbolsize = 15), N2(color = blue, symbol = solidcircle, symbolsize = 15), N3(color = blue, symbol = solidcircle, symbolsize = 15), M1(color = blue, symbol = solidcircle, symbolsize = 15)]), axes = none, view = [-30 .. 10, -10 .. 10], size = [800, 800]); end proc;
plots:-animate(Proc, [t], t = 0 .. 2*Pi, frames = 200);
NULL;
I am trying to program  this drawing, how to improve this code ? Thank you.

## A simplification / reduction question...

I know this question has been asked time and time again. Starting of with the expr . That is the end goal I want to achieve.  How would I reduce the expansion to get it into 1-f(x,y,z)/g(x,y,z) format?. I have tried all sorts of approaches.

 > restart
 > #
 > expr:=1 - (x__1*x__2 + y__1*y__2 - z__1*z__2)^2/((x__1^2 + y__1^2 - z__1^2)*(x__2^2 + y__2^2 - z__2^2))
 (1)
 > normal( (1) );
 (2)
 > simplify( (2) );
 (3)
 (4)
 > Test:=combine(%)
 (5)
 >
 > n:={op(numer(Test))}
 (6)
 > d:={op(expand(denom(Test)))}
 (7)
 > d subset n
 (8)
 > d intersect n
 (9)
 (10)
 > factor( (10) );
 (11)
 > n minus d
 (12)
 >

## Maple Conference 2024 - Registration is now open

by: Maple , Maple Learn

We are pleased to announce that the registration for the Maple Conference 2024 is now open.

Like the last few years, this year’s conference will be a free virtual event. Please visit the conference page for more information on how to register.

This year we are offering a number of new sessions, including more product training options and an Audience Choice session.
You can find an overview of the program on the Sessions page. Those who register before September 10th, 2024 will have a chance to vote for the topics they want to learn more about during the Audience Choice session.

We hope to see you there!

## Result to be square root...

Good afternoon, please I have the following question to see if someone can help me.

I am calculating an integral with a root and when Maple gives me the result it does so in power. I want the result to be given in square root, both this integral and others that I am going to solve.

## Maple 2024.1 crashes with "RandomGraph"...

Whenever I call RandomGraph(20,200), Maple crashes both on the laptop and on the PC: any suggestion?

 >
 >
 (1)
 >

## Wrong Latex generated when using _C1 for constant...

This is some serious problem in Latex in Maple 2024.1

I went back to using _C1, _C2 for my own constants of integration.

But I want to get the nice latex for c__1,c__2.

So to do that, my understanding is that I just need to call Maple's dsolve after restart on some random ode in order to set c__1,c__2 for display only and also for latex.

This below seems to confirm this.  But now the latex generated is all wrong and messed up on some places.

My question is: I want to use use _C1,_C2 (i.e. the traditional constants) in my own code I write which generates solution to an ode, but for Latex, I'd like these to come out as c__1,c__2 since they look nicer.

What is the correct way to do this? What Am I doing wrong here? I do not see it.

 > interface(version);

 > #EXAMPLE showing using _C1 for input and latex. All works OK restart;
 > sol:=y(x) = x+_C1/x^2;

 > #correct latex. No problem compiling, but not nice looking _C1 latex(sol)

y \! \left(x \right) = x +\frac{\textit{\_C1}}{x^{2}}

 > #Example showing what happens when making call to dsolve initially restart;
 > dsolve(diff(y(x),x$2)=0); #this call is used to just activate display of nicer constants  > sol:=y(x) = x+_C1/x^2;  > #bad latex, gives error when compiling with texlive latex(sol) y \! \left(x \right) = x +\frac{c}{_} Download latex_problem_maple_2024_july_18_2024.mw And to confirm this is new problem in Maple 2024, I run the same exact worksheet now in Maple 2023.2, and there it works correctly. i.e. Latex generated is correct in both cases. Here is the Maple 2023.2 worksheet, you can see below the difference in Latex.  > interface(version);  > #EXAMPLE showing using _C1 for input and latex. All works OK restart;  > sol:=y(x) = x+_C1/x^2;  > #correct latex. No problem compiling, but not nice looking _C1 latex(sol) y \! \left(x \right) = x +\frac{\textit{\_C1}}{x^{2}}  > #Example showing what happens when making call to dsolve initially restart;  > dsolve(diff(y(x),x$2)=0); #this call is used to just activate display of nicer constants

 > sol:=y(x) = x+_C1/x^2;

 > #good Latex now in Maple 2023.2. latex(sol)

y \! \left(x \right) = x +\frac{c_{1}}{x^{2}}

If it makes any difference to Maple, I am using the typesetting EXTENDED now for everything. But I do not think Latex should care about this, but thought to mention it just in case.

## How to retrieve the coefficients of a transcedenta...

Hello

Consider,  as an example,  the following (simple) transcendental equation.

alpha*((epsilon-1)*x+y-3*x*z-epsilon/3*x^3+b*sin(w)+3)

How to retrieve the coefficients and the terms considering that the unknowns are x,y,z and w?   Something like [x,y,x*z,x^3,sin(w),1] and their coefficients.

many thanks

## dsolve does not return solution unless given impli...

I have thought before that Maple's dsolve will try to return implicit solution automatically if unable to find explicit one or for some  other reasons it prefers implicit.

But In this ode, we see Maple returns no solution at all for this first order quadrature ode, even though it can find solution when given implicit option.

Is this a correct behaviour? Should it not have returned this solution automatically?

 > interface(version);

 > Physics:-Version();

 > restart;
 > ode:=diff(y(x),x)=sin(y(x)); IC:=y(a)=b;

 > maple_sol:=dsolve([ode,IC]);

 > maple_sol:=dsolve([ode,IC],explicit);

 > maple_sol:=dsolve([ode,IC],implicit);