1

I am trying to find the arc length of the function:

f(x)=-0.005632x^7 + 0.08969x^6-0.5346x^5 + 1.364x^4 -0.8671x^3 -2.005x^2 + 3.038x + 0.4182

I am using this formula:

enter image description here

My boundaries are 0 and 5.

So, it boils down to calculating the following integral: enter image description here

So, the integral of this function:

1+(f'(x))^2 = (0.00155425x^12 - 0.0424313x^11 + 0.500355x^10 - 3.30709x^9 + 13.2222x^8 - 31.6513x^7 + 39.1191x^6 - 3.67819x^5 - 53.2315x^4 + 54.0131x^3 + 0.274601x^2 - 24.3648x + 10.23)^(1/2)

I can't find a way to do so and programs like Wolfram Alpha or Mathway say that either the computing time is too long or the problem is unsolvable.

How should I go about it? Is there a way to integrate the square roots of polynomial functions?

I don't think that the Differentiation under the integral sign works, but I am not sure if I am doing it correctly.

Or, is there another formula that could be used for finding the arc length? I know there is another one for polar coordinates, but I don't know if it would help.

Kate
  • 11
  • 1
  • "Wolfram Alpha or Mathway say that either the computing time is too long or the problem is unsolvable." what is Mathway? There is a timelimit for Wolfram alpha. It looks you tried Integrate and not NIntegrate – Nasser Feb 20 '22 at 00:07
  • 2
    In general we cannot expect symbolic results so far of calculations of such integrals. Read e.g. this answer. There is no genuine difficulty of numerical integration though. – Artes Feb 20 '22 at 00:34
  • Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory [tour] now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Feb 20 '22 at 01:46
  • 4
    Use NIntegrate – Michael E2 Feb 20 '22 at 05:56

2 Answers2

1

As you can not do the integral symbolically, you need numerical integration.

Assume you want the arc length as a function in the range from a to b. For performance we calculate the derivative symbolically and we calculate the integral only from x to x+dx and then accumulate the values. This gives us a table of x and y values that we can interpolate.

For an example we choose a=0,b=1 and dx=0.01:

f[x_] = -0.005632 x^7 + 0.08969 x^6 - 0.5346 x^5 + 1.364 x^4 - 
   0.8671 x^3 - 2.005 x^2 + 3.038 x + 0.4182;
a = 0;
b = 1;
dx = 0.01;
deriv[x_] = Sqrt[1 + f'[x]^2];
ys = Table[
   NIntegrate[deriv[x], {x, x0, x0 + dx}], {x0, a, b - dx, dx}];
PrependTo[ys, 0];
ys = Accumulate[ys];
xs = Table[x, {x, a, b, dx}];
arc = Interpolation[Transpose[{xs, ys}]];
Plot[arc[x], {x, a, b}, 
 Epilog -> {PointSize[Small], Point[Transpose[{xs, ys}]]}]

enter image description here

Daniel Huber
  • 51,463
  • 1
  • 23
  • 57
1
Clear["Global`*"]

f[x_] = -0.005632 x^7 + 0.08969 x^6 - 0.5346 x^5 + 1.364 x^4 - 0.8671 x^3 - 
     2.005 x^2 + 3.038 x + 0.4182 // Rationalize // Simplify;

As mentioned in the comments, use NIntegrate

l = NIntegrate[Sqrt[1 + f'[x]^2], {x, 0, 5}]

(* 6.72629 *)

Or use the built-in function ArcLength

ArcLength[{x, f[x]}, {x, 0, 5}, WorkingPrecision -> 10]

(* 6.726291441 *)

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198