delta7

118 Reputation

6 Badges

13 years, 282 days

MaplePrimes Activity


These are answers submitted by delta7

Sometimes replacing a variable with another expression can help to simplify the expression.

If I replace x in " f(x) for  x>=1 " using x=u+1, I get f(u+1), u>=0.

When I then take d/dx f(x), and then set m=3 for example,

simplify(eval(diff(f(x),x),m=3));

3/8*(1-4*x+6*x^2-4*x^3+x^4)/x/(1+x)^4

Looking at this output I can't really see that it's positive for x>=1.

But this is easy to see if I do x = u+1, where x>=1 means u>=0:

simplify(eval(diff(f(u+1),u),m=3));

3/8*u^4/(u+1)/(2+u)^4

Here it is easy to see that for m=3, d/du f(u+1)>=0 for u>=0 and so d/dx f(x)>=0 for x>=1.

For m=4:

simplify(eval(diff(f(u+1),u),m=4));

1/4*(u^2-8*u-8)*u^2/(u+1)/(2+u)^4

so the derivative of f with m=4 is positive for x> 5+2*sqrt(6).

Perhaps it helps to perform d/du f(u+1), u>=0.

With this trick, I see that df/dx>0 for m=1,2,3.

"trunc" does it.

trunc(-2.01);                  -2

trunc(2.01);                  2

Compare "floor":

floor(2.01);                      2

floor(-2.01);                   -3

 

This looks like homework, so you should better explain what you did so far and where you got stuck.

Just some hint for maple: See ?limit - and don't forget the argument of "cos" and use some brackets around the denominator.

It depends on your equations.

In general: Try it with solve, e.g.:

solve([r*phi=1,r*(1-phi^2)=0],[r,phi]);

    [[r = 1, phi = 1], [r = -1, phi = -1]]

If solve doesn't give a solution: this could have different reasons, depending on the equations.

Maple can also give numeric solutions, see ?fsolve.

Hi,

First of all: LinearAlgebra (at least in Maple 10) has no command rowdim but RowDimension.

A:= assigns a value to the input variable A (same for B) which doesn't make sense and causes an error "invalid left hand side in assignment".
With A and B of type Matrix you don't need to convert them to arrays.

The procedure should perform a matrix product, but your procedure only assigns a value for C[h,j] (the bottom right corner of the matrix C).

You can start with this:

mult := proc (A, B) local h, i, j: global C:
h := LinearAlgebra[RowDimension](A);
i := LinearAlgebra[ColumnDimension](A);
j := LinearAlgebra[ColumnDimension](B);
C:=Matrix(...)
end proc:

Instead of sum, add is better in some cases. But for the Fibonacci numbers you need a loop like

for k from ... to ...
do ...
end

arcsin(W) does not evaluate to real values because W>1. arcsin(W/2) can be plotted.

2) The VariationalCalculus package (maple 8 and 10 have it, so maple 9.5 should have it too)

L:=m/2*(diff(x(t),t)^2+diff(y(t),t)^2)-k/2*x(t)^2-k2/2*y(t)^2;
EulerLagrange(L,t,[x(t),y(t)]);

             / 2      \               / 2      \
             |d       |               |d       |
{-k x(t) - m |--- x(t)|, -k2 y(t) - m |--- y(t)|,
             |  2     |               |  2     |
             \dt      /               \dt      /

       //d      \2   /d      \2\             2              2   /d      \2     /d      \2
 1/2 m ||-- x(t)|  + |-- y(t)| | - 1/2 k x(t)  - 1/2 k2 y(t)  - |-- x(t)|  m - |-- y(t)|  m = K[1]}
       \\dt     /    \dt     / /                                \dt     /      \dt     /

I don't know if it's allowed to use this package for homework though.

This is a system of 16 linear equations with 16 unknown variables. Solving with LinearAlgebra works better for those:

with(LinearAlgebra):
eqs:=[seq](eqn||i,i=1..16):
(Mat,Vec):=GenerateMatrix(eqs,[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p]);
LinearSolve(Mat,Vec);
       Error, (in LinearAlgebra:-LA_Main:-LinearSolve) inconsistent system
Rank(Mat);
       15

 

In Maple 10 connected points with different colours can be produced with "display" using another "pointplot" (but without different coloured line segments):

k := [[1, 5], [2, 4], [3, 7], [4, 8]];# points must be typed that way in Maple10
display(pointplot(k,color=[red,blue,magenta,pink]),
pointplot(k,connect=true));

With e. g. assume(alpha::positive): you can tell Maple that your parameters have to be positive.

In this case, Maple apparently can't give symbolic solutions even with these assumptions.
If you provide numeric values for alpha, kappa etc, you can plot it and find numeric solutions with fsolve (plotting helps to give the initial point).

Example (without thinking of whether the parameters are realistic)

expr:=eval(eq,{alpha=1,kappa[B]=7,kappa=3,mu=4,mu[B]=1});
plot(eq1,eta=0..1);

fsolve(expr);
                                  0.

fsolve(expr,eta=0.9);
                             0.9487214131

 

I don't know why but

int(sqrt(t^5+6*t)*(5*t^4+6),t=0..u)
          2/3*u*(u^4+6)*(u*(u^4+6))^(1/2)
eval(int(sqrt(t^5+6*t)*(5*t^4+6),t=0..u),u=1);
does evaluate to 14/3*7^(1/2) directly.

This solution doesn't use numpoints and arrays:

(pds:-value(u,t=10))(7) returns a list [x = 7., t = 10., u = .34935] so I wrote  procedures for u and v:

Ufunc:=l->eval(u,(pds:-value(u,t=10))(l)):
Vfunc:=l->eval(v,(pds:-value(v,t=10))(l)):

The parametric plot is now
with(plots):
plot([Ufunc,Vfunc,-10..10]);

evalc is good but the RealDomain solution has the disadvantage that it is set globally so everytime I must type :-sqrt(-3) instead of sqrt(-3), and use RealDomain in simplify(long real mess*exp(I*k*z)) end; was quite slow. For an expression like (long trig(theta) term)* exp(ikz) which I had just now I prefer Joe Riel's solution because it leaves the exp term as it is.

1 2 Page 1 of 2