DJJerome1976

385 Reputation

12 Badges

12 years, 274 days

MaplePrimes Activity


These are questions asked by DJJerome1976

I am plotting a simple rational function. When the denominator is completely factored, the discont command works as expected. However, if the denominator is expanded, discont fails.

Why does this happen?

 

restart

(x-3)/((3*x+1)^2*(x-2)^3)

(x-3)/((3*x+1)^2*(x-2)^3)

(1)

plot((x-3)/((3*x+1)^2*(x-2)^3), x = -3 .. 3, y = -2 .. 2, discont = true)

 

normal((x-3)/((3*x+1)^2*(x-2)^3), expanded)

(x-3)/(9*x^5-48*x^4+73*x^3-6*x^2-36*x-8)

(2)

plot((x-3)/(9*x^5-48*x^4+73*x^3-6*x^2-36*x-8), x = -3 .. 3, y = -2 .. 2, discont = true)

 

``

This behavior also occurs in Maple 17.

Download discont.mw

Why does:

Student[Calculus1]:-Tangent(tan(3*x)-5*exp(-x^3),x=0,output=plot,gridlines=true,caption="")

produce the following error?

Error, (in plots:-display) integer or integer range expected in op list

I am using the following commands to create an animation of a simple cardioid being traced out. I would like to add to this an animation of the filling of the region bounded by the curve and the coordinate axes as the curve is being traced out. How might one achieve this?

with(plots):

animatecurve([2-2*sin(theta),theta,theta=0.. 2*Pi],coords=polar,axiscoordinates=polar,frames=250, numpoints=300, scaling=constrained)

Thanks.

I would like to express 2*sin(x+Pi/4) in the form sqrt(2)*sin(x)+sqrt(2)*cos(x). I've tried many variations using simplify/expand/combine/etc. to no avail. Any ideas?

I am playing around with a crude implementation of the bisection algorithm. I am using printf  to display some of the output, however there are a couple extra characters, namely, ()^2, at the end. When the very last line is removed, it goes away. What is causing this?

restart; f := proc (x) options operator, arrow; evalf(x^3-3*x^2+1) end proc; a := 0.; b := 1.0; count := 0; while abs(b-a) > 10^(-8) do count := 1+count; m := (a+b)*(1/2); print([a, m, b]); if f(a)*f(m) < 0 then b := m else a := m end if end do; fval := f(m); printf("\n The function value at %10.10g is %10.10g.\n", m, fval)*printf("\n Number of interations: %d.\n", count)

()^2

(1)

restart; f := proc (x) options operator, arrow; evalf(x^3-3*x^2+1) end proc; a := 0.; b := 1.0; count := 0; while abs(b-a) > 10^(-8) do count := 1+count; m := (a+b)*(1/2); print([a, m, b]); if f(a)*f(m) < 0 then b := m else a := m end if end do; fval := f(m); printf("\n The function value at %10.10g is %10.10g.\n", m, fval)


 The function value at 0.6527036502 is   -1.5e-08.

 

``


Download bisect.mw

2 3 4 5 6 7 8 Page 4 of 11