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

A search of help pages in Maple 13 reveals no such option or command.

Square brackets [] in Maple are for making lists or indices, not for grouping.  Change them to () and you get  119.0088105.

 

Do you mean you want the expected value of u(X)?  For example:

> with(Statistics):
  X:= RandomVariable(Binomial(n,p));
  u:= t -> exp(-a*t);
  ExpectedValue(u(X));

(-p+1)^n*((exp(a)*p-exp(a)-p)/exp(a)/(p-1))^n

> simplify(%) assuming n::posint, p>0,p<1;

(exp(-a)*p-p+1)^n

> M := op([1,1],Q);
  f := CurveFitting[Spline](M, t, degree=1);
  q := Quantile(A, 0.95);
  plots[display](Q, plot(f, t = q .. M[-1,1], 
     filled=true, colour=grey));

> solve({eq1, eq2, eq3, eq4},{a[1],a[2],a[3],a[4]});

0^0 is an "indeterminate form", which strictly speaking has no unique value.  In this case Maple automatically simplifies 0^i (where i is a symbolic variable) to 0, which is correct for all values of i for which the expression 0^i has an unambiguous finite value.

On the other hand, it evaluates x^0 as 1 (again, correct for all values of x for which this has an unambiguous value), so sum(x^0, x=0..4) would be 5.

You have

for i from 1 to N do

but you haven't told Maple what N is.

 BTW, you also have

sw:+1;

which I think you meant to be

sw:= +1;

I don't think that's your actual input to Maple.   It would give you a different error message:

Error, invalid input: coeff expects 2 or 3 arguments, but received 1
 

Maybe you tried something like

>  eq:= y = a*diff(theta(t),t) + b*theta(t) + c;
   coeff(eq, theta(t));

There are several problems here. 

1) coeff wants an expression, not an equation.   Thus you could try looking at one side of the equation.

2) you can take the coefficient with respect to a variable, but not with respect to a function theta(t).

You could do something like this:

>  frontend(coeff, [rhs(eq), theta(t)]);

 

For plotting, you might try inequalities from my Maple Advisor Database: www.math.ubc.ca/~israel/advisor.

I'm not sure what you mean by solving in this context.  The solution set is generally going to be a region, with boundaries consisting of pieces of the curves corresponding to making the inequalities into equalities.

If there's more than one variable to collect, you want to put them into a list or set.  Thus instead of

> collect(f, qdd[1], qdd[2], qdd[5]);  

 

try

> collect(f, [qdd[1], qdd[2], qdd[5]]);

 

or

> collect(f, {qdd[1], qdd[2], qdd[5]});

 

The usual Optimization package finds a local optimum, not necessarily the global optimum, for a nonlinear problem.  The Global Optimization Toolbox attempts to find the global optimum.  See www.maplesoft.com/products/toolboxes/globaloptimization/

The suggestion to use logs may be a good one.  However, it still does not get me a very good fit.

Your definition of f doesn't make sense because it doesn't have an x on the right side.  I assume your t should be x.

I am guessing you want k >= 0, M >= 0 and q >= 0.  In order to avoid complex values you'll also want 1-(1-q*(.0012/M)^(1-q))*exp(-k*q*x) >= 0 for every data point, in particular for the least x in the data, which is 13.2621.   Fortunately, LSSolve allows constraints.
Unfortunately, I'm not getting a very good fit.
 

Actually the eigenvalues are the values of beta^4, namely (n*Pi/L)^4 for nonzero integers n.  Each corresponds to 4 different values of beta, as I said.  The eigenfunction for the eigenvalue (n*Pi/L)^4 is sin(n*Pi/L*x).  Neither of us gave proper consideration to the special case n = 0, which turns out not to correspond to an eigenvalue.

 

Note that the constant 3.14159... is Pi, not pi.  Your example may not be the best since sin(n*Pi) = 0 for all integers n.  But maybe you want something like this (for those n where sin(n*Pi/2) = 0):

 

> select(n -> (sin(n*Pi/2)=0), [$1..10]);

Or if you need to use a loop, something like this:

> for n from 1 to 10 do
    if sin(n*Pi/2) = 0 then print(n) end if
  end do:

You may want to use is(... = 0) rather than just a simple (... = 0), if you are dealing with expressions that might simplify to 0, but not automatically.

 

Are you trying to get something like this?

> Sum(a[ijk](t)*(x^j)^``(k), `i,j,k`=1..n) + ``(b^j)(t) = 0;
First 47 48 49 50 51 52 53 Last Page 49 of 138