## Is this a bug of printf?...

printf("%", [[]]);

Yeah, it is incompatible with the Maple syntax. But I don't know why this command actually causes a serious logic error here. Actually, this seems fairly trifling in my view. Can you produce it again?

 >
 > printf("%", [[]]);

## ODE with complex variable...

Dear Maplers

Consider the follwoing differential equation

Deq:=(K*( Q*sinh(K)*cosh(Q)-K*cosh(K)*sinh(Q))*(1+s*K^2)
+p*(-4*K^2*Q*(K^2+Q^2)
+Q*(Q^4+2*K^2*Q^2+5*K^4)*cosh(K)*cosh(Q)
-K*(Q^4+6*K^2*Q^2+K^4)*sinh(K)*sinh(Q)));

pp := 0.077;
ss := 0;

ode:= diff(Q(K), K) = eval(subs(Q=Q(K),-(diff(Deq, K))/(diff(Deq, Q))),[p=pp,s=ss]);

I aim to solve this DE numerically. Note that K and Q are complex variable and K varies from 0.1.e-5*I to 20.+1.e-5*I

Q(0)=1e-10+1e-10*I

I tried dsolve. but it does not get back correct solutions

sol1 := dsolve({ode,Q(0)=1e-15+1e-15*I}, numeric, method=rkf45, output = listprocedure, abserr = 1.*10^(-6), relerr = 1.*10^(-6), range=0.0+1e-5*I .. 10.0+1e-5*I )


for example sol1(2.0+1e-5*I) return nothing

How can I solve this equation?

## latex problem after latest update to Physics packa...

after updating to latest Physics package, I find now latex geneated is invalid as it gives compile error.

I looked at old files I have and I see the latex generated before was correct. so something changed in the latex() command to cause this and now none of my files compile when I run my Maple program.

Before, same code used to generate this

 \left(-x^{2}+1\right) \left(y^{\prime}\right)^{2} = 1-y^{2}

which compiled correctly.

Here is worksheet

 > interface(version)

 > Physics:-Version()

 > latex:-Settings(useimaginaryunit=i,       usecolor = false,       powersoftrigonometricfunctions= mixed, ## computernotation,       leavespaceafterfunctionname = true,       cacheresults = false,       spaceaftersqrt = true,       linelength=10000   ); Typesetting:-Unsuppress('all'); #always do this. Typesetting:-Settings(prime=x,'typesetprime'=true); #this says to use y'(x) instead of dy/dx     Typesetting:-Suppress(y(x)); # this says to use y' and not y'(x)

 > ode:=(-x^2+1)*diff(y(x),x)^2 = 1-y(x)^2;

 > latex(ode)

\left(-x^{2}+1\right) y^{\prime}^{2} = 1-y^{2}

 >

The error from the latex compiler is

\documentclass[12pt]{book}
\usepackage{breqn}
\usepackage{amsmath}
\begin{document}

\begin{dmath*}
\left(-x^{2}+1\right) y^{\prime}^{2} = 1-y^{2}
\end{dmath*}

\end{document}


compiled using texlive lualatex command gives

(/usr/local/texlive/2022/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
! Double superscript.

l.12 \left(-x^{2}+1\right) y^{\prime}^{2}
= 1-y^{2}
?


The fix is to keep same latex as before or use an extra {} like this  {y^{\prime}}^{2}

but I think \left(y^{\prime}\right)^{2} looks better. But y^{\prime}^{2} is definitly wrong latex.

## I want to simplify G_{ti} expression in a simple w...

I want to take v_{r} , v_{theta}, and v_{pi} common out of this expression and I want to simplify in a more simplify way. The maple sheet is attached below:metriccalculaions.mw

G[ti] := -(v[r]*cos&theta;*cos&phi;+v[r]*cos&theta;*sin&phi;+v[r]*sin&theta;)*rho*(-c^2+(1-A)*(v[r]^2+v[theta]^2+v[phi]^2-(v[r]*cos&theta;*cos&phi;)^2-(v[r]*cos&theta;*sin&phi;)^2-(v[r]*sin&theta;)^2))/(A*c^3)

## a command to count up "compute" the number of cer...

Hello
My Question is is there a command to count up "compute" the number of certain digits in a given number

## Is there a command to get errors from fit paramete...

Hi everyone, I'm studying physics at college and we have to do lab reports. Of course we have to fit data sets. They only taught us how to calculate errors of the parameters of lineaer distributions.

Unforutnately I have to fit points that follow these functions:

First of all, which command do I use to fit for the second function? (Its the formula of  in function of the frequence in RC circuits)

I know for the first one there's the PowerFit command.

Also, is there a command that returns the errors for the variaous fit parameters? (i.e. a,b,c,d)

Or at least, someone knows the methods and formulas to find them?

## Solve numerical PDE...

Hello guys
I'm having trouble solving a PDE using pdsolve-numerical. Here's a notebook attached.

I'm grateful if anyone can help.

Regards,

Oliveira

## Simplifying Units...

x := 19.073*Unit('m'^4*'kg'^2/('s'^6*'A'^2)); simplify(x); Units:-Simple:-simplify(x); Units:-Standard:-simplify(x); Units:-Natural:-simplify(x); convert(x, units, V^2); # None of the simplify commands do anything. Is there a way to get the last result?

## Monge(s circle of an ellipse...

This figure refuses to turn
Fig := proc(t) local a, b, P, Q, N, R, TG, x0, y0, p1, p2, p3, po, tp, sol; a := 11; b := 7; R := sqrt(a^2 + b^2); P := [R*sin(t), R*cos(t)]; x0 := P[1]; y0 := P[2]; TG := (a^2 - x0^2)*(y - y0)^2 + (b^2 - y0^2)*(x - x0)^2 + 2*y0*x0*(x - x0)*(y - y0) = 0; p1 := implicitplot(x^2/a^2 + y^2/b^2 - 1, x = -11 .. 11, y = -7 .. 7, color = blue); p2 := implicitplot(x^2 + y^2 - a^2 - b^2, x = -15 .. 15, y = -15 .. 15, color = blue); p3 := implicitplot(TG, x = -15 .. 15, y = -15 .. 15, color = red); sol := solve({x^2/a^2 + y^2/b^2 - 1 = 0, TG}, {x, y}, explicit); Q := [subs(sol[1], x), subs(sol[1], y)]; N := [subs(sol[2], x), subs(sol[2], y)]; po := plot([P, Q, N], style = point, symbolsize = 15, symbol = solidcircle, color = red); tp := textplot([[P[], "P"], [Q[], "Q"], [N[], "N"]], 'align' = {'above', 'left'}); display([p1, p2, p3, po, tp], scaling = constrained); end procnFig := 60;
Figs := seq(Fig(2*Pi*i/nFig), i = 0 .. nFig);
Error, (in Fig) invalid subscript selector
display(Figs, insequence = true);
NULL; Why this error message. Thank you.

## Calculate the power matrix without using calculato...

Given matrix A, Please help me calculate A^100 by steps, without using Maple or calculators. Thank you so much!

## beginner question on trig simplification...

I'm terribly sorry to ask such elementary questions.

I am getting started on Maple and the most trivial calculations are taking hours.

For example the expression:

b := exp(-i*varphi)*sin(theta/2)*cos(theta/2) + cos(theta/2)*exp(i*varphi)*sin(theta/2)

can be simplifed to           sin(theta)*Cos(Phi)

but no amount of commands such as simplify(b,trig) or combine(b, exp) will do it.

Any hits will be appreciated.

## is this a bug? dsolve gives Error, (in dsolve) inv...

 > interface(version);

 > restart; ode := diff(y(x),x)/y(x)-(3*(4*x^2+y(x)^2+1))/(2*x*(4*x^2+y(x)^2-2-2*x))=0; DEtools:-odeadvisor(ode); sol:=dsolve(ode,y(x));

Error, (in dsolve) invalid subscript selector

 >

## Modifying table created by Tabulate command...

How do you modify the column widths in an already created table?

## How do I create the groups (Z/nZ)+ and (Z/nZ)*?...

I want to create the groups (Z/nZ)+ and (Z/nZ)*.

I can do this in python for n=7. I want to do this with other values of n.

(Z/7Z)+
0 1 2 3 4 5 6
0 0 1 2 3 4 5 6
1 1 2 3 4 5 6 0
2 2 3 4 5 6 0 1
3 3 4 5 6 0 1 2
4 4 5 6 0 1 2 3
5 5 6 0 1 2 3 4
6 6 0 1 2 3 4 5

(Z/7Z)*
1 2 3 4 5 6
1 1 2 3 4 5 6
2 2 4 6 1 3 5
3 3 6 2 5 1 4
4 4 1 5 2 6 3
5 5 3 1 6 4 2
6 6 5 4 3 2 1

I tried creating a Cayley table but can not get that right.

## Why fsolve does not work in this case?...

I started to use maple recently and I do not know why fsolve does not work in this case:

Sol-NLSE.mw

I am wondering if the conjugate(x[j]) is the reason.