2220 Reputation

19 Badges

4 years, 275 days

MaplePrimes Activity

These are answers submitted by C_R

I assume that you are familar with Maple styles and in your question you want, for example, to change only the font of all Maple input in an existing document.

What you have to do is:

  • hide all other screen content using view-> show/hide contents
  • select all remaining content with the mouse
  • change the font
  • show the hinden content using view-> show/hide contents

Units in (4) are correct if t in (4) is evaluated with units. With units standard int must be mapped over a column vector (I don't know why that is).


with(VectorCalculus); SetCoordinates('cartesian[x, y, z]')




g := evalf(Constant(g, units))



`#mover(mi("\`v__0\`"),mo("&rarr;"))` := `<,>`(v[0]*Unit('m'/'s'), 0*Unit('m'/'s'), 0*Unit('m'/'s'))

Vector[column](%id = 36893490633426056244)


`#mover(mi("a"),mo("&rarr;"))` := `<,>`(0*Unit('m'/'s'^2), g, 0*Unit('m'/'s'^2))

Vector[column](%id = 36893490633436725244)


int(`#mover(mi("a"),mo("&rarr;"))`, t)

Vector[column](%id = 36893490633436713196)



Vector[column](%id = 36893490633436699932)



`#mover(mi("a"),mo("&rarr;"))` := <0*Unit(('m')/'s'^2), g, 0*Unit(('m')/'s'^2)>

Vector(3, {(1) = 0, (2) = g, (3) = 0})



Vector(3, {(1) = 0, (2) = g*t, (3) = 0})



Vector(3, {(1) = 0, (2) = g*t, (3) = 0})


Download Units_and_Integrals_reply.mw

I assume that you are able to generate plots for the exact and the approximate solution using the plot command.

Each of these plots have to be assigned to a name with the assignment operator :=

Then you can plot boths solutions in one plot using plots:- display command.

If you have these solutions in a worksheet and you can't manage to compare them, you could upload them using the green arrow.

To your question: How to calculate this integral?

My preliminary answer is: Don't use Maples sophisticated algorithms.

Zoomed in it looks like this

This could explain why Maples sophisticated integration methods have difficulties. They will try to follow all the oscillations.

Annother reason could be: The function you want to integrate is not always real valued also (see the attachment).

Could you tell a bit more about your integrand?

PS:: I have just seen Roubens answer. Zoomed it looks also jagged.


Do you want the new constant to have the highest index? If filling of gaps is acceptable

do n++ until not(has(_C||n,myconstants)):
new_constant := _C ||(n)

Otherwise, in your example myconstants is a set and the element with the highest index is to the right.

do n++ until is(_C||n=myconstants[-1]):
new_constant := _C ||(n)

I guess there are shorter ways

but you will get three bulky solutions

For clarity I assume in the following that you combine the coefficients into new ones.
Your equations will look like this


cos(3*phi)-a*cos(phi) = b



sin(3*phi)-a*sin(phi) = c



Solve for phi


4*cos(phi)^3-3*cos(phi)-a*cos(phi) = b


[[phi = arccos((1/6)*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)-6*(-(1/12)*a-1/4)/(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3))], [phi = Pi-arccos((1/12)*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)-3*(-(1/12)*a-1/4)/(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)-((1/2)*I)*3^(1/2)*((1/6)*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)+6*(-(1/12)*a-1/4)/(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)))], [phi = arccos(-(1/12)*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)+3*(-(1/12)*a-1/4)/(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)-((1/2)*I)*3^(1/2)*((1/6)*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)+6*(-(1/12)*a-1/4)/(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)))]]


You get 3 solutions for for phi that you can substitute one after each other into eq2



(1/18)*(-9*(((2/3)*a-2)*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(2/3)+(3*b+(1/3)*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)+(a+3)^2)/(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(2/3))^(1/2)*((-a+3)*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(2/3)+(9*b+(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))*(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(1/3)+3*(a+3)^2)/(27*b+3*(-3*a^3-27*a^2+81*b^2-81*a-81)^(1/2))^(2/3) = c



Depending on the initial parameters you might be able to simplify further and select an equation that describes your problem

Download elliminate_phi.mw

Maple is capable to integrate up to the first 200 roots without any special methods.

evalf(Int(abs(sin(x^4))/(sqrt(x) + x^2), x = 0 .. 5))