## 155 Reputation

6 years, 205 days

## Why is this triple integral not evaluati...

Maple 2018

For some reason the Maple software is not evaluating the last bounds for a triple integral.

But the evalf command works.

## Invalid subscript selector....

Maple 2017

I am writing a small code to find median and mean. The code works for an even number of terms, not for an odd number of terms. I tried to find the error but cannot.

restart:medianmean:= proc(x) local a,b,c,d,m,g;
a:=sort(x); b:=nops(x); c:=nops(x)/2; d:=(nops(x)+1)/2;
if (b mod 2 = 0) then evalf([a,m,g]) ;
else evalf([a,a[d],g]);
end if; end proc:

## Unexpected RootOf result, would like hel...

Maple 2017

I am not sure why I am getting this RootOf result when I solve for x.

Here is my code.

restart:
eq:=4*x^2+2*y(x)^2=32.5625:
deq:=solve(  diff(eq,x), diff(y(x),x) ):
deq=3;
y(x)=solve(deq=3,y(x));
x=solve(deq=3,x);

The last equation we are solving is  -2x / y = 3.
So we should get y  = -2/3 x and  x = -3/2 y.

The Maple software correctly solves for y in terms of x,
but gives an odd Rootof answer when solving for x. Why is that?

I am not sure how to intepret RootOf(2*_Z+3*y(_Z)).

## Would like help with op/nops in a functi...

Maple 2017

Hi. I wrote a command for finding second derivative.

#secondderiv test of f(x,y)
f:=x^2+2*x*y+2*y^3:
H:=hessian(f,[x,y]);
seq([subs(soln[k],eval(H)),det(subs(soln[k],eval(H)))],k=1..nops(op(soln)))

Everything runs fine ... except if I change the function f to
f:=x^2+2*x*y+2*y^2
Then I get error :
Error, invalid input: nops expects 1 argument, but received 2

I sort of understand the error, when there is a single solution
{x=0,y=0} , then the op removes the parentheses to get x=0, y=0
which is now two arguments, and nops requires one argument.
I tried to use  nops(op({soln} ) , but that is not the correct approach
since it overcounts. Also it throws an error if change back f to the original expression.

## How to get a real number output. ...

Maple 2017

I entered this function
f:=x->(4*x^2-4)^(4/5);

Then I entered f(0) and got (-4)^(4/5).

When I tried to approximate , I got -2.452480922+1.781831689*I

I am looking for the real number value, which is 3.031433 with my TI-83 calculator and here https://www.desmos.com/calculator/b1soxuhbri

How do I set it in maple so that x is assumed to be real in f(x) and all outputs are real.

 1 2 3 4 5 6 7 Page 3 of 8
﻿