Items tagged with evalf

my codes list below.note the last line of the codes.evalf is not effective? the output is a long expression. how to force the maple to evaluate the long expression into a numeric value?


 ALL := [`$`(1 .. 3)]:
 solution_k := simplify(solve(map(proc (i) options operator, arrow:
 1/k[i] = (cos(Phi)*(x[i]-Tx)+sin(Phi)*(y[i]-Ty))/(-sin(Phi)*(x[i]-Tx)+cos(Phi)*(y[i]-Ty)) end proc, ALL), [Tx, Ty, Phi]), size):
 k := map(proc (i) options operator, arrow:
 tan(phi[i]) end proc, ALL):
 deg2rad := Tolerances:-`*`(Pi, Tolerances:-`^`(180, Tolerances:-`-`(1))):
 phi0[1] := Tolerances:-`*`(Pi, Tolerances:-`^`(3, Tolerances:-`-`(1))):
 phi0[2] := Pi:
 phi0[3] := Tolerances:-`-`(Tolerances:-`*`(Pi, Tolerances:-`^`(3, Tolerances:-`-`(1)))):
 alpha := Tolerances:-`*`(Pi, Tolerances:-`^`(10, Tolerances:-`-`(1))):
 L := 1:
 phi := phi0:
 x := map(proc (i) options operator, arrow:
 cos(phi0[i]+alpha)*L end proc, ALL):
 y := map(proc (i) options operator, arrow:
 sin(phi0[i]+alpha)*L end proc, ALL):
 angleError := Tolerances:-`&+-`(0, Tolerances:-`^`(10, -4)):
 locError := Tolerances:-`&+-`(0, Tolerances:-`^`(10, -4)):
 phi := map(proc (i) options operator, arrow:
 phi[i]+angleError end proc, ALL):
 x := map(proc (i) options operator, arrow:
 x[i]+locError end proc, ALL):
 y := map(proc (i) options operator, arrow:
 y[i]+locError end proc, ALL):



I can get the function to iterate as a recursive function by just reevaluating the x := evalf(x-(f1*j-i*g1)/(h*k-i*j), 25); y := evalf(y-(h*g1-f1*j)/(h*k-i*j), 25) portion of the function below but im trying beneath it to assign it as newt2d so that i can iterate it as newtons method in two variables like (newt2d@@10) and I can't seem to figure out what im doing wrong. Thanks for any help you can provide!

f := proc (x, y) options operator, arrow; x+y-cos(x)+sin(y-1) end proc; f1 := f(x, y)

(x, y) -> x + y - cos(x) + sin(y - 1)
x + y - cos(x) + sin(y - 1)

> g := proc (x, y) options operator, arrow; x^4+y^4-2*x*y end proc; g1 := g(x, y);

(x, y) -> x + y - 2 x y
x + y - 2 x y

> dh := D[1](f); h := dh(x, y);

(x, y) -> 1 + sin(x)
1 + sin(x)

> di := D[2](f); i := di(x, y);

(x, y) -> 1 + cos(y - 1)
1 + cos(y - 1)

> dj := D[1](g); j := dj(x, y);

(x, y) -> 4 x - 2 y
4 x - 2 y

> dk := D[2](g); k := dk(x, y);

(x, y) -> 4 y - 2 x
4 y - 2 x

x := .3; y := .8


> x := evalf(x-(f1*j-i*g1)/(h*k-i*j), 25); y := evalf(y-(h*g1-f1*j)/(h*k-i*j), 25);


> newt2d(.3, .8);

0.2577789764, 0.8333916830

> (newt2d@@5)(.3, .8);

Error, (in @@) invalid arguments

I would like to tell Maple to evaluate all numbers in an expression using floating point numbers (of a desired precision). Short example:




while I want it to print 


Note that the real expression may be arbitrarily complicated. I know that it is possible easily because I have already seen this somewhere, but I don't remember it. 

How to solve this equation



solve(%,x) and evalf(%) ?

I get no solution. Is there any option to force Maple to solve this equation by solve and evalf?

Student[Calculus1]:-NewtonsMetnod(%,x=2) solves the problem.
If I use Series for sin(x) and cos(x) Maple can solve it too.

Thank you


If i use expression with function add() it runs normaly, but if I use expression with Threads:-Add (parallel implementation) it causes error "Error, continuation task already created for the current task" or "Kernel connection has been lost"


Array(1 .. N,1 .. 1/2*N-NR-1,(i, m) -> evalf(Add(cosArr2[modp(k*i,N)]/kl[k],k = 1 .. NR+m-1)+Add(cosArr2[modp(k*i,N)]*alpha[k],k = NR+m .. 1/2*N)))


What am I doing wrong? Can I use two Add in one evalf?

The following limit does not return a value. Then the evalf gives a wrong answer.

The answer should be "undefined" or -infinity .. infinity.

limit(exp(n)/(-1)^n, n = infinity) assuming n::posint; evalf(%);

                       /exp(n)              \
                  limit|------, n = infinity|
                       |    n               |
                       \(-1)                /


The same happens if you delete the assumption.


A similar problem occurs with

limit(sin(Pi/2+2*Pi*n), n = infinity) assuming n::posint;
                            -1 .. 1
without the assumption this would be appropriate.

I was looking at a question on another forum, and tried in Maple also, and Maple also have a problem with this integral. Here is a simple version. The problem is that int() gives different numerical answer from evalf(Int). Maple can't solve this analytically, so values have to be used for the integrand before calling int()

eq2:=(a/(a + c*z))^L*exp(-z)/sqrt(z);

int(eq2,z=0..infinity);   # 177.245
evalf(Int(eq2,z=0..infinity));   # 1.7551

I think the 1.7551 is the correct value. My question is: Why did maple give wrong answer from int()? Is it analytical reason, or purely numerical?

Maple 17.02, windows 7.

Hi everyone. Long time reader, first time poster.

I have a rather nasty function that I need to use in various calculations (namely, one of them is a numerical integration). But, even evaluating this function at a given point takes exceedingly long (several seconds to tens, maybe even hundreds of seconds!). Is there any way I can make maple do all of the calculations numerically instead of doing all but the last evalf symbolically? I think that may be the problem. Anyway, here is my defined function:

I'm given this equation:

f := proc (x) options operator, arrow; x^5-51*x^4+939*x^3-7685*x^2+28800*x-40500 end proc

and I have to find the decimall value of 


How do you program this in Maple?

How do I do to get a single number (decimal) when I evaluate an input.


For example, I write this:

evalf((546, 1/1000000000)*(7, 0)*sqrt(36+1/(7, 0)^2));

but I still get the same thing as I inputed as a response, how do I do to get an actual number?


Can somebody explain me this:

Dear All,

evalf(RoofOf(Z^6-3*Z^4+3*Z^2+Z-1,index=real[2]) fails to deliver a numerical value.

  1. I can use fsolve to compute the real roots but I need to replace all the occurences of RootOf by its numerical value in lengthy expressions.
  2. Also simplify(RoofOf(Z^6-3*Z^4+3*Z^2+Z-1,index=real[2],RootOf) does not work.
  3. I read the other posts related but could not find any answer.

Thanks for any help,



 I want to calculate successive roots of the following complex eq.

how can I set interval (?) for fsolve in the following code:

Why won't evalf give me a number.  I have solved for a variable "iDS" higher up in my sheet, and want the approximate value of an element in a matrix.  this element is a function of iDS and no matter what I do, I get the function of iDS!

I really want to use Maple.  I see what it can do, but I often get "stuck" and very frustrated when I can't get it to do what I need it to do.  Sometimes when you are doing assignments, you need a number!


Quite often, the result Maple gives involves exponents.

For example:


When I use "evalf", "simplify", or right-click and select "approximate," I always obtain a fraction with e^13/50. How an I get a numerical approximation!



1 2 3 4 5 Page 3 of 5