max125

175 Reputation

8 Badges

9 years, 127 days

MaplePrimes Activity


These are questions asked by max125

Hi. I wrote a command for finding second derivative.

#secondderiv test of f(x,y)
f:=x^2+2*x*y+2*y^3:
Gradient(f,[x,y]);
soln:=solve(Equate(Gradient(f,[x,y]),<0,0>));
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.


 

 

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.

I am trying to solve a factorial inequality.

solve(1/(n+1)! * exp(0.1)<=0.00001)

I get no result and a warning, "some solutions may have been lost".

Also same problem with the simpler inequality

solve(1/(n+1)! <=0.00001)

Wolfram has no problem solving it.

Am I entering it wrong? I attached a copy of my worksheet.

factorialinequality.mw

 

The problem came up when solving this problem: What degree of the maclaurin polynomial  is required so that the error in the approximation of e0.1 is less than 0.00001

I am trying to solve the equation

exp(2*sin(t))-1=0, over the interval 0 <= t <=  16

I tried entering this into Maple:

solve({exp(2*sin(t))-1=0, 0 <= t,t <= 16}, AllSolutions, Explicit)

When I enter it, Maple just says "Evaluating"... and then returns nothing.

I tried "solve" without AllSolutions/Explicit, and even fsolve.

Then Maple only gives me the trivial result t = 0.

Is there a way to approximate the roots, like a root solver.

Ideally I would like to get the exact roots over the interval [0,16].

Wolfram has no problem solving this exactly.https://www.wolframalpha.com/input/?i=solve(%5Bexp(2*sin(t))-1%3D0,+0+%3C%3D+t,t+%3C%3D+16%5D,+AllSolutions,+Explicit)

I posted the worksheet

solveroots.mw

The problem, find the general solution of y '' + 4y = t cos (2t).

Maple input:

de:=diff(y(t),t,t)+4*y(t)=t*cos(2*t);
sol:=dsolve(de,y(t));

Maple output:

sin(2*t)*_C2+cos(2*t)*_C1+(1/8)*t^2*sin(2*t)-(1/64)*sin(2*t)+(1/16)*t*cos(2*t)

The odd thing is the inclusion of the term -(1/64)*sin(2*t). It is not incorrect since you can collect this term with sin(2*t)*_C2. Is there a reason why it's there, and how can i remove it without inspecting it? Note that Wolfram doesn't have this extra term.

https://www.wolframalpha.com/input/?i=solve+y%27%27+%2B+4y+%3D+t*cos(2*t)

I attached the worksheet and added a more detailed calculation.

diffeq.mw

 

2 3 4 5 6 7 8 Page 4 of 8