VypocetIntegralu := proc (vyraz) local r, h, cesky, preklad, simple, vypis; cesky := false; vypis := false; if nargs = 2 and args[2] = czech then cesky := true end if; r := Int(vyraz,x); print(r = ``); while h <> [] do h := Student :-Calculus1:-Hint(r); if 1 < nops({h}) then h := op(1,{h}) end if; preklad := h; if h <> [] then vypis := true; r := Student:-Calculus1:-Rule[h](r); if cesky then if h[1] = rewrite then preklad[1] := `upravíme výraz` end if; if h[ 1] = sum then preklad[1] := `rozepíšeme součet` end if; if h[1] = constant then preklad[1] := `integrujeme konstantu` end if; if h[1] = constantmultiple then preklad[1] := `vytkneme konstantu`; vypis := false end if; if h[1] = partialfractions then preklad[1] := `rozložíme na parciální zlomky` end if; if h[1] = change then preklad := [`zavedeme substituci`, h[2]] end if; if h[1] = power or h[1] = sin or h[1] = cos or h[1] = exp then preklad[1] := `integrujeme výraz` end if; if h[1] = revert then preklad[1] := `dosadíme zpět` end if; if h[1] = parts then preklad := [ `užijeme metodu per partes`, u = h[2], v = h[3]] end if; if h[1] = solve then preklad[1] := `integrál spočítáme algebraicky` end if end if; if vypis then print(preklad); print(`` = rhs(r)) end if end if end do; if vypis then simple := simplify(rhs(r)); if simple <> rhs(r) then print([`upravíme výraz`]); print (`` = simple) end if end if end proc;