Robert Israel

6577 Reputation

21 Badges

18 years, 209 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are answers submitted by Robert Israel

The way to have Maple integrate this itself is

int(-1/3*sinh(2*x)*sin(3*x), x);

The standard "Math 101" way to do the integral is to integrate by parts twice, resulting in an expression where the original integral appears with a factor different from 1, and then solve. 

In the Tutor, the steps are:

1) ConstantMultiple

2) Parts with f = sinh(2*x), g = -cos(3*x)/3

3) ConstantMultiple

4) Parts with f = cosh(2*x), g = sin(3*x)/3

5) Solve

It's not at all clear to me what is being asked about here.  Perhaps it might help if you post an
example of what you're trying to do.

:= assigns a value to a variable, while assuming makes temporary assumptions about variables
(e.g. affecting what simplifications are done on expressions involving those variables).   As for
making an expression or equation with a certain value of a parameter, the best way to do that
is with eval or subs.  For example:

>  equation := x^2 + a*x + b = 0;
    eq1 := eval(equation, {a=1, b = 2});

for j from 15 to 27 by 3 do
for k from 1 to 3 do
if k = 1 then ru := 0
elif k = 2 then ru := 0.2
elif k = 3 then ru := 0.5
end if
end do
end do;

or

for j from 15 to 27 by 3 do
for k from 1 to 3 do
ru:= piecewise(k = 1, 0, k = 2, 0.2, k = 3, 0.5)
end do
end do;

What you have found is a local maximum, but not the global maximum.  The Optimization package does not always produce a global optimum.  The GlobalOptimization package might be useful.

If I understand you correctly, a "way" in this problem consists of F1 followed by an arbitrary permutation (not combination) of F2, S1 and S2.  So:

> with(combinat):
   ways:= map(t -> [F1,op(t)], permute([F2,S1,S2]));
   nops(ways) = numbperm([F2,S1,S2]);

Roundoff error can do strange things.  Usually, a higher value of Digits gives a better final result, but it seems this is not always the case.   Without seeing the actual equation you're using fsolve on, it's hard to say more about what's going on in your problem.

I think it is unlikely that there is a closed form formula for these.  Maple can't even find an antiderivative for

exp(delta^2/(1-delta)), for example.  Neither can integrals.com.  Of course, given numerical values for the parameters, Maple can use numerical methods.

If X is a random variable with the appropriate Binomial distribution, you're looking at 100*X.

> with(Statistics):
X:= RandomVariable(Binomial(n,p));
Y:= 100*X;

You made several errors. 
I assume you meant something like this:

Graphing:= proc ()
local R, G, B, result;
use Maplets[Tools] in
result:= plot (MathML:-Import (Get (MathMLEditor1)), x = 0 .. 10);
Set('Plotter1' = result);
end use:
end proc;

with(Maplets[Elements]):
M1:= Maplet([MathMLEditor[MathMLEditor1](sin(x)),
Button("Go",Evaluate(function=Graphing)),
Plotter['Plotter1']()]):
Maplets[Display](M1);

 

Here's one way.  Note that this works in the Standard interface, not in Classic.

> plots[display](plottools[transform]((v,u) -> [(1+u)*cos(v), (1+u)*sin(v)])
       (plot(1, x=0..2*Pi, filled=true, colour=cyan)), labels=[x,y]);

2D input strikes again!  The upper endpoint of the inner integral in your first attempt (e) has no space between the b and the delta, so Maple interprets this as a new variable bdelta (actually `bδ`).  The second attempt is correct, but the answer can't be expressed in closed form. 

> m[1]:= 5;
   with(Units[Standard]);
   L := 6*Unit(''m'');

or

L := 6*Unit(metres);

Vt is the transpose of the matrix of normalized eigenvectors of A^%T . A (with the eigenvalues in decreasing order).
A complication is that the expressions in terms of radicals for the eigenvalues (the roots of a cubic polynomial with three real roots) involve complex numbers.  This means that in floating-point evaluation, roundoff error is likely to produce spurious imaginary components.  Also these complicated expressions are numerically rather unstable: large values of Digits are needed to get reasonably accurate results.

> E, V:= Eigenvectors(A^%T . A):
   VC:= [Column(V, 1..3)]:
   evalf(E, 20);

        [                                                  -18  ]
        [0.00001903926493165102 - 0.21014736709748720756 10    I]

        [                                                  -18  ]
        [0.59315130896781441884 + 0.29214736709748720756 10    I]

        [                              -19  ]
        [2.1969902581347830063 - 0.8 10    I]


 So in this particular case  we want to take the vectors in reverse order.

 

> Vt := Matrix(map(Normalize, [VC[3],VC[2],VC[1]], Euclidean))^%T;

Maple may be getting confused because the subscript r for one of the dependent variables is the same as the independent variable.

> ode2:= subs(h[r](r) = hr(r), h[2](r) = h2(r), h[v](r)=hv(r), ode);
   dsolve(ode2);
                              /             5                 4
  {h2(r) = h2(r), hr(r) = 1/2 |6 _C1 ln(r) r  - 12 _C1 ln(r) r  M
                              \

                   2  3          3  2             4            4
         + 12 _C1 M  r  + 8 _C1 M  r  - 12 _C1 M r  + 8 r _C1 M

                               5                        4
         - 6 _C1 ln(-r + 2 M) r  + 12 _C1 ln(-r + 2 M) r  M

                  5          4     /d       \  2     /d       \
         - 2 _C2 r  + 4 _C2 r  M - |-- h2(r)| r  + 2 |-- h2(r)| r M
                                   \dr      /        \dr      /

                                \
         + 2 h2(r) r - 4 h2(r) M|/(r (-r + 2 M)), hv(r) = (
                                /

                     4                3            2  2          3
        3 _C1 ln(r) r  - 6 _C1 ln(r) r  M + 6 _C1 M  r  + 4 _C1 M  r

                    3          4                       4
         - 6 _C1 M r  + 4 _C1 M  - 3 _C1 ln(-r + 2 M) r

                               3          4          3
         + 6 _C1 ln(-r + 2 M) r  M - _C2 r  + 2 _C2 r  M)/r}

To check this:

> odetest(%, ode2);

       [ 0, 0, 0]

Note that h2(r) is still an arbitrary function in the solution.  Thus this system is underdetermined: any (sufficiently differentiable) h2(r), as well as arbitrary constants _C1 and _C2, could be used.

For example:

> f:= (x,y,z) -> x^4 + y^4 + z^4 - x*y*z + x;
Optimization[Minimize](x, {f(x,y,z)=0});

[-1.04164355650322005, [x = -1.04164355650322, y = .510304912633470, z = -.510304900700816]]

Note that in general what you get is a local minimum, not necessarily a global minimum.

We might be able to help more if you told us your actual function f.
First 35 36 37 38 39 40 41 Last Page 37 of 138