I have defined some functions that units should use. Now another function is used to integrate it, whereby the integration variable is also quantified and the input into this function takes place. I better just show a code:

It is not beautiful, but I think that nothing is beautiful in Mathematica. I don't speak the tungsten language very well and I don't have much experience with symbolic expressions.

Back to the code: this will work fine, but if I plug in some numbers or variables, it won't work:

As you can see, something is wrong. I did several hours of research yesterday and just can't get it to work. I want to draw this and do some calculations, so nothing special, but for this to work, it has to accept inputs like `1 s`

and `t s`

.

Bonus: I can't take care of these delayed features. As you can see, h (x, s, t) gives a simple piecewise function. So why does it take ages and millennia to plan this? I have to do `h(x_, s_, t_) = ...`

instead of `:=`

? That didn't seem to do anything for me. This also assumes that I have not used any units so the above works.

The code in the text:

```
Clear("Global`*")
g = UnitConvert(
Entity("Planet", "Earth")(EntityProperty("Planet", "Gravity")));
TWR(t : Quantity(_, unit_)?(CompatibleUnitQ(#, "Seconds") &)) :=
FullSimplify(
Piecewise({{0.65 Quantity(1, (1/("Seconds")))*t,
0 Quantity(1, "Seconds") < t <
2.05 Quantity(1, "Seconds")}, {1.3325,
t >= 2.05 Quantity(1, "Seconds")}}), t (Element) Reals)
a(t : Quantity(_, unit_)?(CompatibleUnitQ(#, "Seconds") &)) :=
FullSimplify((TWR(t) - 1) g, t (Element) Reals)
v(t : Quantity(_, unit_)?(CompatibleUnitQ(#, "Seconds") &)) :=
FullSimplify(
Integrate(
a(Quantity(T, "Seconds")), {Quantity(T, "Seconds"),
Quantity(0, "Seconds"), t}, Assumptions -> t (Element) Reals),
t (Element) Reals)
h(x_, s_, t : Quantity(_, unit_)?(CompatibleUnitQ(#, "Seconds") &)) :=
FullSimplify(
x Quantity(1, "Meters") +
s Quantity(1, (("Meters")/("Seconds")))*t +
Integrate(
v(Quantity(c, "Seconds")), {Quantity(c, "Seconds"),
Quantity(0, "Seconds"), t},
Assumptions -> t (Element) Reals && c (Element) Reals),
t (Element) Reals)
```