Select powers and coeffs on a general type polynom...

I was experimenting on and found coeff and degrees  do not work with algebraic type powers. So I set aboud dismanteling  a example polynomial. I certainly went around the houses doing this. I wanted to put the powers and coefficinets of x in an array.

I sure there must be a simpler way.

Unexpected results from pdsolve...

 > restart;
 > pde := diff(u(x,t),t) + u(x,t)*diff(u(x,t),x) = 0;

These are all wrong:

 > pdsolve({pde,u(x,0)=f(x)}); pdsolve({pde,u(x,0)=sin(x)}); pdsolve({pde,u(x,0)=erf(x)});

But these ones are correct:

 > pdsolve({pde,u(x,0)=exp(x)}); pdsolve({pde,u(x,0)=x});

how to tell Maple not to automatically expand nu...

in a worksheet, typing

`r:=(x^2 - 2*x - 1)/4;`

Maple returns

But when typing

```r:=(x^2 - 2*x - 1)/(4*x);
```

Now it does not expand terms and gives what is expected

Is there a way to make the first example remain unexpanded? Same with Mathematica:

I know this only affects the display only. But it is annoying, as I want to see the numerator and denominator on the screen as I put them there and not have them change.

I tried changing the typesetting level, but this had no effect.

I used to like Maple becuase it does not change anything unless asked to, and everything is explicit, which is better.

Now I am starting to change my mind on this aspect of Maple.

Plot Coupled Oscillators ...

Hello. Is there any way to plot 2+ oscillators as shown in the image below?

Thanks for any help.

Newbie Question...

Hi,

Newbie here....

I'm struggling to see with the default font size, I'm also struggling with readability of the text/charactors in the left hand paletetes/workbook pull down menus.  I can see that there are style choice options in format>styles but it seems that I need to set every single permutation separately to acheive readability nirvana which seems unlikely to be the best route.

Is there a global setting for font size?  Alternatively are there style files somewhere that the nearly blind can download?

I am really struggling with this.

Cheers

Surface or contour plot of discontinuous function ...

Please, how do I use surface or contour to plot discontinous function?

z = f(x,y) := x-.8193318913*sin(x)*cos(x)/(cos(x)^2+sinh(y)^2)-(0.2931044702e-2*(0.7500000000e-3*x^2-0.7500000000e-3*y^2+0.1622336517e-1))*sin(x)*cos(x)/(((0.7500000000e-3*x^2-0.7500000000e-3*y^2+0.1622336517e-1)^2+0.2250000000e-5*x^2*y^2)*(cos(x)^2+sinh(y)^2))-0.4396567053e-5*x*y*sinh(y)*cosh(y)/(((0.7500000000e-3*x^2-0.7500000000e-3*y^2+0.1622336517e-1)^2+0.2250000000e-5*x^2*y^2)*(cos(x)^2+sinh(y)^2)):

How should I handle the limit in the integration answe?. I don't see why it is necessary.

What is the convenient way to export a large symbo...

What is the best and accurate way to export a large symbolic matrix (200*300) from Maple to Matlab? The Marix have a lot of variables, symbols and operators such as diiff, int, ....

Here is a simple example:

 >
 >
 >
 (1)
 >
 >
 >
 >
 >
 >
 >
 >

Collection or book of math puzzles for children...

I would appreciate any recommendation on these games and puzzles with maple implementation. The purpose is to inspire the math interest of children (say 16-) . Benefits from the assistance of Maple:

1. Learn and build the habit of math modelling: eg by playing with this n-queen problem - https://www.maplesoft.com/Applications/Detail.aspx?id=154482

Children can realize that, for many problems, modelling is doable for them - question formation in math/programming and finding all the constraints - while solution method is simply a small step if done by computer. This is already a big step forward for them and they may enjoy the modelling process. For more math-eager kids, they may start to explore the documentation behind the solution methods.

2. Learn the art of automatic proof by witnessing the efficiency gain by themselves - I don't think I have to explain such to the community here. I note Doron Zeilberger has collected many in such a spirit on his website.

I have read some in the Application Center (eg under the tag game) and by searching here by the "puzzle". Is there some more systematic collection/books? The applications I have seen is mostly on logical/combinatorial problems. Love to see the games/puzzles under a broader range of math fields good for children.

How to select an undocumented name generated by Ro...

Even though this question is related to this one
feel it is about a different issue. If any of you feel otherwise feel free to move it to the original one.

In this notional example  the name _Z1~ is created by RootOf: and here is an ad hoc way to catch it.

 > restart:
 > f := RootOf(cos(x)-z, x): u := indets(f, name); s := series(f, z): v := remove(type, indets(s, name), constant); w := v minus u
 (1)
 >

In this more complex example an assumption must be made on M to obtain ths desired solution g and the previous method no longer works.

 > restart
 > f := 10*cos((-1+t)/sqrt(1+M))-10*cos(t/sqrt(1+M)): assume(M::nonnegative): u := indets(f, name); g := solve({diff(f, t), t>0 }, t, allsolutions)[1][1]; v := remove(type, indets(rhs(g), name), constant); w := v minus u
 (1)
 >

I have tried using select to "capture" the name _Z2~ but I can't know how to distinguish M~ from _Z2~ (is there a type which could be used?).

Can you helpm fix this?
TIA

what is the sign of I*sqrt(3) supposed to be?...

Is there an assumption or some other way I can tell Maple to avoid such errors when using odetest, as I get many of them.

I think the solution Maple gives is correct. But odetest generates these strange innternal error that it does not know the sign of a complex number.

```restart;
ode:=x^2*diff(y(x), x\$2) + (cos(x)-1)*diff(y(x), x) + exp(x)*y(x) = 0;
sol:=dsolve(ode,y(x),series):
odetest(sol,ode,series,point=0);
```

Error, (in odetest/series) need to determine the sign of I*3^(1/2)

I've seen such error many times before and it is still not fixed in release after release.

I am using Maple 2022.1 on windows 10.

Visual Studio Complier: Which version for MapleSim...

To make the "Simple External Code Function" example of the tutorial work, an external complier is required.

in MapleSim:-CreateDataRecord) invalid input: dsolve/numeric/ToExternal:-AddTempFile expects its 1st argument, f, to be of type string, but received [[["f1", 1864151924736]]] (3.597s)

Update:

help(Setup, Compiler) in Maple 2022 provides a link to supported compilers, which are Visual Studio 2017 and 2019.

In the list of available downloads there is no mention of "Express Edition". Which of the packages can be installed alternatively?

Why does dsolve return a solution with a singular...

I don't understand why the solution of sys_2 isn't those of sys_1 when M__p=1 and M__a=0 ?

Traces of the computation seem to indicate that dsolve proceeds exactly the same for sys_2 and sys_1 .

Please note that sol_1 contains a term of the form t*cos(t) that sol_2 doesn't, thus the question: "Is sol_2 correct?"

Could you help me to fix this?
TIA

 > restart
 > infolevel[dsolve] := 4;
 (1)
 > sys_1 := {diff(x(t), t\$2)=sin(t)-x(t), x(0)=0, D(x)(0)=0}; sol_1 := dsolve(sys_1)
 Methods for second order ODEs: --- Trying classification methods --- trying a quadrature trying high order exact linear fully integrable trying differential order: 2; linear nonhomogeneous with symmetry [0,1] trying a double symmetry of the form [xi=0, eta=F(x)] -> Try solving first the homogeneous part of the ODE    checking if the LODE has constant coefficients    <- constant coefficients successful    -> Determining now a particular solution to the non-homogeneous ODE       building a particular solution using variation of parameters <- solving first the homogeneous part of the ODE successful
 (2)
 > sys_2 := {(M__p+M__a)*diff(x(t), t\$2)=M__p*sin(t)-x(t), x(0)=0, D(x)(0)=0}; sol_2 := dsolve(sys_2)
 Methods for second order ODEs: --- Trying classification methods --- trying a quadrature trying high order exact linear fully integrable trying differential order: 2; linear nonhomogeneous with symmetry [0,1] trying a double symmetry of the form [xi=0, eta=F(x)] -> Try solving first the homogeneous part of the ODE    checking if the LODE has constant coefficients    <- constant coefficients successful    -> Determining now a particular solution to the non-homogeneous ODE       building a particular solution using variation of parameters <- solving first the homogeneous part of the ODE successful
 (3)
 > eval(sol_2, [M__p=1, M__a=0])
 >

PS: Already, in the following case, dsolve doesn't return the solution of sys_1.

```sys_3 := {(A+B)*diff(x(t), t\$2)=(A+B)*sin(t)-x(t), x(0)=0, D(x)(0)=0};
sol_3 := dsolve(sys_3)
```

If I do this

```sys_4 := {(A+B)*diff(v(t), t)=(A+B)*sin(t)-x(t), diff(x(t), t)=v(t), x(0)=0, v(0)=0}:
sol_4 := dsolve(sys_4)
```

I get a very complex solution wich contains a piecewise function which separates the cases A+B=1 and A+B<>1.
Evaluating sol_4 for A+B=1 gives the same expression than sys_1:

```simplify(eval(sol_4, A=1-B), trig)
/       1                  1          1         \
{ v(t) = - sin(t) t, x(t) = - sin(t) - - cos(t) t }
\       2                  2          2         /
```

Here is a workaround to get the correct solution of sys_2:

```sys_5 := {(M__P+M__A)*diff(v(t), t)=(M__P+C)*sin(t)-x(t), diff(x(t), t)=v(t), x(0)=0, v(0)=0}:
sol_5 := dsolve(sys_5):
simplify(eval(sol_5, [M__P=1, M__A=0, C=0]), trig)
/       1                  1          1         \
{ v(t) = - sin(t) t, x(t) = - sin(t) - - cos(t) t }
\       2                  2          2         /
```

e

plotting a function...

Hi,

Please how I do plot: theta := -(65.7014900075861*(cos(-4.536529763+45365.29764*z)+.1749541674))*exp(-1.603200636*t) for z=0..d.

I tried this:

display(plot([seq(subs(t = i, theta), i = [seq(0.1*ii, ii = 1 .. 7)])], z = 0 .. d));

But I want this sequence: [seq(subs(t = i, theta), i = [seq(0.1*ii, ii = 1 .. 7)])] to include Pi/2 such that t_0 = Pi/2 in the plot. I.e., I want the Pi/2 to be the initial value in the sequence.

How can I get the desired answer from "solve"...

I compute the solution of this differential system

```shock := piecewise(t <0, 0, t < 1, 10, 0):
sys   := {(M__p+M__a)*diff(x(t), t\$2)=M__p*shock-x(t), x(0)=0, D(x)(0)=0}
sol   := unapply(rhs(dsolve(sys)), (M__p,M__a))
```

I'm interested in 3 quantities:

• the first time tend > 0 such that sol(tend) = 0,
• the time tmax in (0..tend) where sol(tmax) reaches its maximum value,
• the value xmax = sol(tmax).

Since sol has a relatively simple expression, I first attempted to use solve for calculating tend, but that didn't work.
The conclusion is still the same for tmax and xmax.

The values of these 3 quantities that I expect solve to provide, are those obtained using fsolve.

Can you explain me the failures I faced and show me how to force solve to get these values?
TIA

ToyProblem.mw

 First 62 63 64 65 66 67 68 Last Page 64 of 2211
﻿