jakubi

1379 Reputation

12 Badges

19 years, 166 days

MaplePrimes Activity


These are answers submitted by jakubi

See e.g. this one.

What is delta?

Your post appears incomplete and the link to your worksheet is not working. May be better if you post your comands in text form.

For example:

`#msub(mi("m"),mn("1"))`*(`#msub(mi("T"),mn("1"))`-T)*
`#msub(mi("C"),mi("p"))` = -`#msub(mi("m"),mn("2"))`*
(`#msub(mi("T"),mn("2"))`-T)*`#msub(mi("C"),mi("p"))` :


solve(%,`#msub(mi("T"),mn("1"))`);
          1                                     
---------------------- (#msub(mi("m"),mn("1")) T
#msub(mi("m"),mn("1"))                          

   - #msub(mi("m"),mn("2")) #msub(mi("T"),mn("2")) + 
#msub(mi("m"),mn("2")) T)


An inconvenience of increasing printlevel to large values is the long output produced, full of quite irrelevant details. If possible, it is better to start tracing the specific routines that do the main part of the job. Here, you can do something like:

infolevel[all]:=5:
trace(int):
trace(`int/trigon`):
trace(`int/xsincos`):
printlevel:=1:
int(cos(3*x)^5*sin(3*x)^2,x);

{--> enter int:-ModuleApply, args = cos(3*x)^5*sin(3*x)^2, x
int:   Beginning integration with _EnvContinuous=_EnvContinuous, _EnvAllSolutio\
ns=_EnvAllSolutions, and _EnvCauchyPrincipalValue=_EnvCauchyPrincipalValue.
int/indef1:   first-stage indefinite integration
int/indef2:   second-stage indefinite integration
int/indef2:   applying change of variables
int/indef1:   first-stage indefinite integration
int/indef1:   first-stage indefinite integration
int/indef2:   second-stage indefinite integration
{--> enter int/trigon, args = cos(_X)^5*sin(_X)^2
int/trigon:   case of integrand containing trigs
                                    ff := {}

                                         5        2
                            ff := cos(_X)  sin(_X)

                                          5  2
                                  ffx := Z  Y

                                    dx := 0

                                    ds := 2

                                    dc := 5

{--> enter int/xsincos, args = 0, 2, 5
{--> enter int/xsincos, args = 0, 0, 5
{--> enter int/xsincos, args = 0, 0, 3
value remembered (in int/xsincos): int/xsincos(0, 0, 1) -> sin(_X)
<-- exit int/xsincos (now in int/xsincos) = 1/3*cos(_X)^2*sin(_X)+2/3*sin(_X)}
<-- exit int/xsincos (now in int/xsincos) = 1/5*cos(_X)^4*sin(_X)+4/15*cos(_X)^
2*sin(_X)+8/15*sin(_X)}
<-- exit int/xsincos (now in int/trigon) = -1/7*sin(_X)*cos(_X)^6+1/35*cos(_X)^
4*sin(_X)+4/105*cos(_X)^2*sin(_X)+8/105*sin(_X)}
<-- exit int/trigon (now in int/indef2) = -1/7*sin(_X)*cos(_X)^6+1/35*cos(_X)^4
*sin(_X)+4/105*cos(_X)^2*sin(_X)+8/105*sin(_X)}
<-- exit int:-ModuleApply (now at top level) = -1/21*cos(3*x)^6*sin(3*x)+1/105*
cos(3*x)^4*sin(3*x)+4/315*cos(3*x)^2*sin(3*x)+8/315*sin(3*x)}
              6                          4                          2
-1/21 cos(3 x)  sin(3 x) + 1/105 cos(3 x)  sin(3 x) + 4/315 cos(3 x)  sin(3 x)

     + 8/315 sin(3 x)


Providing full details (e.g. a worksheet) may be that your question could be answered.

Do you have a complete example showing this problem?

Normally, it works fine, e.g.:

f:=piecewise(x<0,-x,x<1,1,0);
                           { -x          x < 0
                           {
                      f := { 1           x < 1
                           {
                           { 0         otherwise

simplify(f^2);

                          {  2
                          { x         x < 0
                          {
                          { 1         x < 1
                          {
                          { 0         1 <= x

int(f^2,x=-1..2);

                                 4/3

int(f^2,x=-1..0)+int(f^2,x=0..1);

                                 4/3


May be simpler by a function call, like:

K:=(alpha,a,b)->Int( N* Diff(psi(f, theta[1], theta[2]), theta[a])* 
Diff(psi(f, theta[1], theta[2]), theta[b])* f^alpha):

K(4,1,2);

        /    d                               \
  Int(N |--------- psi(f, theta[1], theta[2])|
        \dtheta[1]                           /

        /    d                               \  4
        |--------- psi(f, theta[1], theta[2])| f )
        \dtheta[2]                           /


May be something like:

`property/g`(complex):= real:
is(g(h),real) assuming h::complex;

                                 true

 

There are several representations for real ranges but none of them, or combined make an actual good implementation. The property representation that you are using is probably the less bad one.

The conversion back to a set of relations can be made a little bit shorter like:

convert(x in OrProp(a[], b[]),compose,relation,set);
                           {x <= 3, 0 < x}

To get the complement of a real range in this property representation I have this partially developed code (i.e. not satisfactory yet):

notrange:=proc(r)
if r::specfunc(anything,OrProp) then 
convert(map(u->x::u,r),compose,list,relation);
subs(And=Or,%);
map(x->map(SolveTools:-Utilities:-NegateRelation,x),[op(%)]);
convert(%,`and`);
convert(%,boolean_operator);
OrProp(solve(%));
elif r::specfunc(anything,RealRange) then 
map(SolveTools:-Utilities:-NegateRelation,
(convert(x::r,compose,relation,`and`)));
OrProp(solve(convert(%,`or`)));
else Not(r)
end if:end proc:

notrange(a[]);

       OrProp(RealRange(2, infinity), RealRange(-infinity, 0))

Like:

diff(u(x, y, z),z);

  /  2             \
  | d              | /d            \
  |----- f(x, y, z)| |-- f(x, y, z)|
  \dz dx           / \dy           /

                           /  2             \
           /d            \ | d              |
         + |-- f(x, y, z)| |----- f(x, y, z)|
           \dx           / \dz dy           /

Nevertheless, the integration methods used by dsolve can be traced:

ode1:=diff(phi(x),x$2)+1/x*diff(phi(x),x)-phi(x)/x^2=
-1/DD*(q*x/2+P/(2*Pi*x)):

infolevel[dsolve]:=5:
dsolve(ode1);
Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
trying high order exact linear fully integrable
<- high order exact linear fully integrable successful

                                        2
                       _C2        x (q x  Pi + 4 P ln(x) - 2 P)
      phi(x) = x _C1 + --- - 1/16 -----------------------------
                        x                     DD Pi


If kernel means all the w such that f(w)=u, then, trivially in this example:

solve(x+y=u,{x});
                             {x = -y + u}

When differentiating w.r.t. conjugate(z) I get an error instead:

diff(S(z,conjugate(z),xi),conjugate(z));

Error, invalid input: diff received conjugate(z), 
which is not valid for its 2nd argument

However, I get a similar answer when differentiating w.r.t. z:

diff(S(z,conjugate(z),xi),z);

D[1](S)(z,conjugate(z),xi)+D[2](S)(z,conjugate(z),xi)*
(-1/z*conjugate(z)+2*abs(1,z)/signum(z))

The last term between brackets should simplify to 0, but it is undefined for non real z (c.f. ?abs ).

It may be more convenient in such a case to input from a file and output to a file, like:

maple < input-file > output-file
5 6 7 8 9 10 11 Last Page 7 of 24