csn899
(Lee Tao)
April 25, 2024, 11:02am
1
The functions f[x] and g[x] have domains of R,and f[x]+g[4-x]=4,g[4]=8,g[x]-f[x-8]=8,and g[4+x]=g[4-x].Find the value of sum = Sum[f[2*m], {m, 1, 16}]
I tried this set of code and did not find the cumulative value
Clear["`*"]
g[x_ /; x <= 4] = g[x] = g[8 - x]
g[4] = 8
f[x_ /; x >= 4] = f[x] = 4 - g[4 - x]
f[x_ /; x < 4] = f[x] = g[x + 8] - 8
\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(m = 1\), \(16\)]\(f[2 m]\)\)
If you’re going to post the same question as you did on another forum, you really need to provide a link to that question as you can be wasting the time of folks trying to help you that don’t know there might be informative comments or even answers.
https://mathematica.stackexchange.com/questions/302375/how-to-find-the-cumulative-value-through-the-abstract-function-analytic-expressi
Here is a way:
With[{m = 16},
vls = Solve[Flatten@Table[{
f[x] + g[4 - x] == 4,
g[4] == 8,
g[x] - f[x - 8] == 8,
g[4 + x] == g[4 - x]},
{x, -2 m, 2 m}]];
Sum[f[2 k], {k, m}] /. vls[[1]]]
csn899
(Lee Tao)
April 26, 2024, 10:47am
4
Thank you! What is the meaning and function of this code?
Flatten@Table[{f[x] + g[4 - x] == 4, g[4] == 8, g[x] - f[x - 8] == 8,
g[4 + x] == g[4 - x]}, {x, -32, 32}]
It gives numerical values to the variable x and sets up the system of equations. Try the effect with a smaller range:
Flatten@Table[{f[x] + g[4 - x] == 4, g[4] == 8, g[x] - f[x - 8] == 8,
g[4 + x] == g[4 - x]}, {x, -1, 1}]