Menu ▾ ▴

#3697 Wrong calculation result after integration

None
not-a-bug
nobody
integrate (247)
5
2021-01-10
2021-01-06
bel
No

Using maxima.cesga.es:

Input:
a(t) := a0*(t/t1)$
v(t) := integrate(a(t) , t)$
v(t);
v(t1);

Result:
(a0 * t^2) / (2 * t1)
a0 * t1

Expected Result:
(a0 * t^2) / (2 * t1)
(a0 * t1) / 2

Note 1:
Input
q(t) := (a0 * t^2) / (2 * t1) $
q(t1);
correctly return (a0 * t1) / 2

Note 2:
Using "z" instead of "t" in v(z) := integrate ... returns the correct value as well.
a(t) := a0*(t/t1)$
v(z) := integrate(a(t) , t)$
v(t);
v(t1);

Discussion

  • bel

    bel - 2021-01-06

    Correction to Note 2: v(z) := integrate(a(t) , t, 0, z)$

     
  • Robert Dodier

    Robert Dodier - 2021-01-10
    • labels: --> integrate
    • status: open --> not-a-bug
     
  • Robert Dodier

    Robert Dodier - 2021-01-10

    I don't see a bug here, so I'm closing this ticket as not-a-bug.

    The problem occurs because of the conventional obscuring of the different roles of t1. An indefinite integral is really mapping one function to another function, but unless one is being careful with notation, that's not clear, and Maxima has adopted that convention.

    What v(t1) should really mean is that the integral is evaluated and then t1 is substituted into the result. You showed one way to do that, via the definite integral. Here are two more ways:

    v(t):= at(integrate(a(tfoo), tfoo), tfoo=t);
    

    and

    v(t) := subst(tfoo = t, integrate(a(tfoo), tfoo));
    

    where tfoo is just a made-up name which is different from t or anything a user would enter.

    Thanks for taking the time to make a bug report. I hope my notes are helpful in some way.

     

Log in to post a comment.