Preben Alsholm

13603 Reputation

22 Badges

19 years, 201 days

MaplePrimes Activity

These are replies submitted by Preben Alsholm

@Ronny Yes, MultiSeries is implemented as a package.
Technically, this means it is a module with option package.
Executing with(MultiSeries) makes its content:
[AddFunction, FunctionSupported, GetFunction, LeadingTerm, RemoveFunction, SeriesInfo, asympt, limit, multiseries, series, taylor]

available in the short form as in this case limit.

This can be very convenient.

Even after having executed with(MultiSeries), the usual limit is still available as :-limit

limit(CylinderU(0,CylinderU(0,x)),x=0); # Fine
:-limit(CylinderU(0,CylinderU(0,x)),x=0); # The old wrong result.



The only successful are ftoc and msftoc with result xx*exp(-1/2).

The same result if simplify(A) is the input. Somewhat strange!

Well, it's somewhat better if you assume that n::posint:

is(G(2*n) = G(2*n + 1) + G(2*n + 2)) assuming n::posint;

Certainly checking concrete cases results in true:

{seq(is(G(2*n) = G(2*n + 1) + G(2*n + 2)),n=1..100)}; # a set of one element: true


@nm In your "counter example" dsolve returns a solution, which odetest verifies:

ode:=exp(diff(y(x), x) - y(x)) - diff(y(x), x)^2 + 1 = 0;
odetest(sol,ode); # 0

If I understand you correctly, by counter example you mean an example showing that this general statement is false:
"It is always better to use PDEtools:-Solve rather than solve".

Just a remark.

dsolve(ode) returns
y(x) = Int(RootOf(-x + ln(_Z) + sin(_Z)), x) + c__1.

odetest is made so that it certainly verifies solutions coming from dsolve.
PDEtools:-Solve, odetest, and dsolve have the same author as I believe you know.

@Axel Vogt Yes, indeed. That was a long time ago.
The procedure is here:

description "Input a complex number or a list or set of complex numbers. Output the polar form r*'exp'(I*v)
or, if 'useExp' is given as a second argument, r*Exp(I*v)";
local EXP;
if type(tal,{list,set}) then return map(procname,tal,e) end if;
if type(tal,specfunc(anything,polar)) 
      if e='useExp' then op(1,tal)*Exp(I*op(2,tal)) else op(1,tal)*'exp'(I*op(2,tal)) end if
end if
end proc;

`print/Exp` := proc(z) 'e'^z end proc;
## Examples:

Actually, I also added this simple extension of value:

`value/Exp`:=proc() exp(args) end proc:
### Example


In Maple 2024 solve treats this equation the same as in Maple 2018.

@nm I happen to be in the beta forum. I'll report this as a weakness and give a link to this page.

Note: SCR submitted.

@nm In my reply I incorrectly referred to the statement listed for definite integration. I have now corrected that.
About method = _RETURNVERBOSE the statements under definite and indefinite integration are identical.

method=_RETURNVERBOSE applies all of the known methods and reports the results for each.

It is puzzling why the "default" result isn't identical to the _DEFAULT result.
So, yes, I agree that that is strange.

But try this:


Output: 2*arctan(tan(1/2*x)) + 2/(tan(1/2*x) + 1)

So method = default is different from method =_DEFAULT.

Correction: The following statement is about definite integration:
In the help page for Integration Methods we find this somewhat cryptic statement:
method=_DEFAULT forces use of the default integration method.  It runs all of the integrators in sequence and returns the first answer found.


Under Indefinite Integration it says

method=_DEFAULT is equivalent to not specifying a method, exactly like definite and numeric integration.

But try this:

integrand:=sin(x)/(sin(x) + 1);
maple_result_1 :=int(integrand,x);

The results are exactly the same.

Actually no assumptions are needed:

#But this is a solution
odetest(SOL,[ode,ic]) ;


@Mathrookie94 I played a little with it. Notice that the exponential terms in sol like exp(17/2500 - 17/2500*x)
can be split since exp(x+y)=exp(x)*exp(y):
Thus we can do:


You will see that the constant part exp(17/2500) becomes just a float.
You get
f(x) = 426.8577244 + 300.733958*exp(-0.006800000000*x) - 48.5791876*exp(-0.01020000000*x) - 620.5737973*exp(-0.003400000000*x)

Please upload a worksheet instead of or in addition to a screenshot.

Go to the fat green uparrow in the editor you use to post questions, answers, or replies.

I have seen other cases where it pays to consider a more general version.
Anyway, here are two animations in b. The first shows that of the 2 solutions found only the second solves the equation on some interval.

numelems(res); #2

Here is an image of the end of animation 2:

@charlie_fcl I only had to fight to get rid of the .txt in maple.ini.txt.

When I did your worksheets ran.

1 2 3 4 5 6 7 Last Page 1 of 228