| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
Hallo Robert,
Eine andere Art:In[24]:= m3[x_, y_] := Block[{r0 = x, rm = y}, Integrate[rho[r] r^2, {r, x, y}]]In[25]:= m3[2.1, 2.2] Out[25]= 0.227583 rho0
... und noch eine andere Art:
In[54]:= Remove[rho, m4]
rho[r_] := rho0/(rm - r0)*(rm - r)
m4[x_, y_, f_: rho] :=
Integrate[(f[r] /. If[f === rho, {r0 -> x, rm -> y}, {}])*r^2, {r, x,
y}]
In[57]:= m4[2.1, 2.2]
Out[57]= 0.227583 rho0
In[58]:= m4[1, 2, Sin]
Out[58]= -Cos[1] - 2 (Cos[2] + Sin[1] - 2 Sin[2])
Schönen Sonntag!
Udo.
| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
DMUG-Archiv, http://www.mathematica.ch/archiv.html