## How to realize the Complete Sauqre?...

Why this simple case cannot be simplified to Complete Square form

restart:

EQ := 1/4*n[1]^4 - 1/2*n[1]^2 + 1/4

simplify(1/4*n[1]^4 - 1/2*n[1]^2 + 1/4, 'size')

with(Student[Precalculus])
CompleteSquare(EQ);

## RE: how to apply product to sum identities of trig...

Dear all,

Would you tell me a way to apply the identity relationship in Maple, to rewrite 'subexp' below to 'subexp2'?

 > restart;
 > subexp := M__a*sin(omega*t + alpha)*I__a*sin(omega*t + phi);
 (1)
 > subexp2 := M__a * I__a * (-1/2*(cos(2*omega*t + alpha + phi)-cos(alpha - phi)));
 (2)
 > is(subexp = subexp2);
 (3)
 >

## Propriety of an ellipse...

In the plane, an ABC triangle is considered for the vertices B and C are fixed, A being variable so that b +c remains constant and equal to a given length l. (b=distance(A,C), (c=distance(A,B)
How to show that the product tan(B/2=*tan(C/2) remains constant ?

## Complicated solution of dsolve with RootOf(_Z)...

Hello,

I would like to solve this equation and keep the parameters a and eta unknown and assign them a value later on. Is it possible ?

I know I can solve this equation numerically, it works, but I want to change the parameters to fit experimental data.

I tried this :

ode:=diff(y(t),t)=-(4/3)*(a/eta)*(y(t)^3+1):
lambdaE:=dsolve({ode,y(0)=1},y(t),explicit);

But the solution appears with RootOf expression and I can't get a numerical solution afterwards.

lambdaE := y(t) = RootOf(6*eta*sqrt(3)*arctan(((2*_Z - 1)*sqrt(3))/3) - eta*sqrt(3)*Pi - 3*eta*ln(_Z^2 - _Z + 1) + 6*eta*ln(_Z + 1) - 6*eta*ln(2) + 24*t*a)

I tried some things from forums but nothing works.

Do you have any leads on how to do it please ?

Manon

## is there easy way to simulate lines rotation?...

is there easy way to simulate lines rotation like robotic arm following point P moving by adjusting angle q1 and q2?

i feel point two lines and simulate static two lines in animate is also not easy.

with(plots):
with(geometry):
#Joint at (5,5)
#length a  2, y=7, x, solve(subs(y=7,2^2 = (y-5)^2+(x-5)^2), x)[1];
#length b 2, y=1, x, solve(subs(y=4,2^2 = (y-5)^2+(x-5)^2), x)[1];
point(A, 5, 5), point(B, solve(subs(y=7,2^2 = (y-5)^2+(x-5)^2), x)[1], 7):
point(C, 5, 5), point(D, solve(subs(y=4,2^2 = (y-5)^2+(x-5)^2), x)[1], 4):
line(L1, [A, B]);
line(L2, [C, D]);
_EnvHorizontalName := x;
_EnvVerticalName := y;
Equation(L1);
Equation(L2);
solve(Equation(L1), y);
solve(Equation(L2), y);
plot([solve(Equation(L1), y),solve(Equation(L2), y)], x = 1 .. 2);
animate(plot, [Equation(L1),Equation(L2), x = 0 .. 2], A = -3 .. 3);

Angle Reference from below

angle of L2 , q1a

angle of L1,  q2a

p1 := vector([a*cos(q1), a*sin(q1)]);
P := evalm(p1 + b*vector([cos(q1+q2), sin(q1+q2)]));
Pe := map(expand, P);
A := {cos(q1) = c1, sin(q1) =s1, cos(q2)=c2, sin(q2)=s2};
P := subs(A, op(Pe));
F1 := [x - P[1], y - P[2], s1^2+c1^2-1, s2^2+c2^2-1 ];
F2 := subs({a=1, b=1}, F1);
with(Groebner):
g1 := Basis(F2, plex(c2, s2, c1, s1, y, x));
g1 := [-4*x^2+x^4+2*x^2*y^2+y^4-4*y*x^2*s1-4*y^3*s1+4*s1^2*x^2+4*s1^2*y^2, 2*y*s1+2*x*c1-x^2-y^2, 4*x-x^3-y^2*x+2*y*x*s1-2*y^2*c1-4*s1^2*x+4*y*s1*c1, s1^2+c1^2-1, x*s1-y*c1+s2, -y^2+2-x^2+2*c2];
map(indets, g1);

g2 := Basis(F2, plex(c2, s2, c1, s1));

assume point x = 1, y = 0.5
g2spec := subs({x=1, y=1/2}, [g2[1],g2[3]]);
S1 := [solve(g2spec[1])];
q1a := evalf(arcsin(S1[1]));
q1b := evalf(arcsin(S1[2]));

S2 := [solve(subs(s1=S1[1], g2spec[2])), solve(subs(s1=S1[2], g2spec[2])) ];
q2a := evalf(arcsin(S2[1]));
q2b := evalf(arcsin(S2[2]));

q2a := subs({a=2,b=2}, q2a);
if q2a < 0 then
q2a_pi := evalf(eval(-q2a-Pi));
else
q2a_pi := evalf(eval(Pi-q2a));
end if:
q2a_pi;

q2b := subs({a=2,b=2}, q2b);
if q2b < 0 then
q2b_pi := evalf(eval(-q2b-Pi));
else
q2b_pi := evalf(eval(Pi-q2b));
end if:
q2b_pi;

## issue with Physics:-Latex. Invalid latex on expres...

I've been using Physics:-Latex in my large program, and checking the output visually. I noticed this small issue on one page.

When asking Physics:-Latex to generate Latex for this expression

It gives

While when using standard latex() command, the result is

Below is the worksheet attached. Using Latest Physics and Maple.

 > interface(version)

 > Physics:-Version()

 > restart;
 >
 > expr:=1/2*int(exp(-t)*f(t),t)*exp(t)-1/2*exp(-t)*int(exp(t)*f(t),t)

 > Physics:-Latex(expr)

\frac{\left(\int {\rm e}^{-t} f \left(t \right)d t \right) {\rm e}^{t}}{2}+-\frac{1}{2} {\rm e}^{-t} \left(\int {\rm e}^{t} f \left(t \right)d t \right)

 > latex(expr)

{\frac {\int \!{{\rm e}^{-t}}f \left( t \right) \,{\rm d}t{{\rm e}^{t}
}}{2}}-{\frac {{{\rm e}^{-t}}\int \!{{\rm e}^{t}}f \left( t \right)
\,{\rm d}t}{2}}

 >

THe latex file used to compile the Maple output Latex using TeXLive distribution on Linux is

\documentclass[12pt]{article}
\usepackage{amsmath}
%\usepackage{maplestd2e} %not needed for this example
\begin{document}

%output of Physics:-Latex()
$\frac{\left(\int {\rm e}^{-t} f \left(t \right)d t \right) {\rm e}^{t}}{2}+-\frac{1}{2} {\rm e}^{-t} \left(\int {\rm e}^{t} f \left(t \right)d t \right)$

%output of maple latex()
${\frac {\int \!{{\rm e}^{-t}}f \left( t \right) \,{\rm d}t{{\rm e}^{t}}}{2}}-{\frac {{{\rm e}^{-t}}\int \!{{\rm e}^{t}}f \left( t \right) \,{\rm d}t}{2}}$

\end{document}

## Set Maple 2020 as default open file .mw and .mws...

Hello everyone, my computer installed Maple 2016, 2020 and set Maple 2016 as default opening files .mw, .mws. How to change default to Maple 2020 . I tried searching on Google but not found.

Thank you very much.

## residual sum of squares in Nonlinear curve...

Hello!

How to calculate the residual sum of squares of a Nonlinear Fitting?

I tried but was unsuccessful.

## express the function z in terms of Legendre functi...

How I can prove the following equation in red box.

Also, Pn(v) and qn(v) are the real combinations of half-integer Legendre functions.

https://math.stackexchange.com/questions/2746660/potential-flow-around-a-torus-laplace-equation-in-toroidal-coordinates/3809487#3809487

## How is this Basisgrid procedure programmed?...

I did already some programmingexercises , but this sort of programming example i did not encounter in the programmingbook
How it is programmed in general lines ?
I do have a lot of small procedures to learn from

But it is too much asked here on the forum to explain all ins and outs for this procedure, because it is not that simple.

## Changing the standard unit to Joules per kilogram ...

When I'm doing math more complicated, than in the first line, Maple gives the incorrect type of unit.
I want the unit as displayed in the first line, but by using the math/syntax shown in the last line.

Maple does not have "Joule per kilogram times kelvin", as a choosable option when I do the syntax in the last line.

Is there any way I can end up with the correct unit, even tho I am using syntaxes?
In theory, I should end up with the same answer as a result?.

## Maple 2D Output automatic aligment...

Is it possible to make executed math aka 2D Outputs, automatically align left?
I'm doing it manually for every execution I make. But is there any setting, that does orient the text to the left by standard?

## How to Perform Set Operations with Intervals?...

I have intervals A=(-infinity,7), B=(-10,25), and C=(15,infinity). How do I use Maple to perform the union and intersection of such intervals?

## new issue using Physics:-Latex() . Changes typeset...

I spend all day on this, since some tests I have were failing when I changed to using Physics:-Latex() vs. latex(). I made no change at all in my own code other than to replace latex() by Physics:-Latex().

I am still not sure why that is, but it seems due to symbol clash somewhere.  First time I run my test, it passes, next time if fails. When I change back to latex(), the test passes each time.

This seems to be due to when calling Physics:-Latex() the very first time, it automatically changing diff(y(x),x) to y'(x). May be it is storing its own x in there. (this happens on special input and not for each input, that is why only some tests fail and not all of them).

So next time I call the test it failes. May be due to different x being used. I do not know.

All what I know now is that using latex() makes my dsolve test passes each time.

But here I will show the issue which I think if fixed, should fix the main problem.

Calling Physics:-Latex() causes it to automatically change diff(y(x),x) to y'(x)  even though I am not using Typeseeting at all.

restart;
s:= y = u*x:  #special case input which causes the typesetting to kick in
ode:=diff(y(x),x)=1:
print(ode);
Physics:-Latex(s,output = string):
print(ode);



Notice how the derivative changes on its own to using y'(x).  Now compare with latex()

restart;
s:= y = u*x:
ode:=diff(y(x),x)=1:
print(ode);
latex(s,output = string):
print(ode);


So something happens inside Physics:-:Latex which causes this.

For now, I will change back to latex() until I figure more what is going on so that my test do not fail. I like to use Physics:-:Latex as it made the latex look much better.

Maple 2020.1, Physics 778

 > restart;
 > interface(version)

 > Physics:-Version();

 > s:= y = u*x: ode:=diff(y(x),x)=1: print(ode); Physics:-Latex(s,output = string): #latex(s,output = string): print(ode);

 >