# Tag Info

9

You can see why when you break it up. Since you use 1.1 then Mathematica evaluated it numerically. Compare v = 1 + I a = Abs[v] b = Exp[I Arg[v]] a*b With v = 1.10 + I a = Abs[v] b = Exp[I Arg[v]] a*b You see that Exp[I Arg[v]] now is 0.73994 + 0.672673 I To keep things nice, as your first example, use exact number v = 11/10 + I a = Abs[v] b = Exp[I Arg[...

3

What can I do to have a sequences of j and n in Plot function without specifying paticular numbers If I understand you right, you can first generate the j,n data first Clear["Global*"] data = Flatten[Table[{j, n}, {j, 3}, {n, 3}], 1] Now generate the functions for each j,n above f[j_, n_, x_] := Piecewise[{{0, j/2^n <= x && x <= (...

2

You can use Fold and switch i and v in your definition of h ... h[v_, i_] := ... Fold[h, v, Range] (* h[h[h[v, 1], 2], 3] *) ... or switch the order directly in Fold. h[i_, v_] := ... Fold[h[#2, #1] &, v, Range] (* h[3, h[2, h[1, v]]] *)

1

We can test the result by uses Newton-Leibniz formula. f = Integrate[x/(-x^2 + a x + b)^(1/2), x]; expr2 = (f /. x -> Sqrt[R^2 + b]) - (f /. x -> Sqrt[b]) expr1 = Integrate[ x/(-x^2 + a x + b)^(1/2), {x, Sqrt[b], Sqrt[R^2 + b]}, Assumptions -> {a > 0, b > 0, R > 0}] FullSimplify[expr1 == expr2, Assumptions -> {a > 0, b > 0, R &...

1

Clear["Global*"] Include the assumption that R is real. Assuming[{a > 0, b > 0, Element[R, Reals]}, Integrate[x/(-x^2 + a x + b)^(1/2), {x, Sqrt[b], Sqrt[R^2 + b]}] // FullSimplify]

1

as far as I know, you can't define functions inside Table or a Do loop. Unless there is a hack to do it. My main objective is to define and use a family of functions Why not define the function F itself to take its id as part of the definition? As a meta function. Like this F[i_,Subscript[β_,i_],Subscript[b_,i_]]:=Subscript[β,i]+i+i*Subscript[b,i] And ...

1

Here's how I would write your example, in a way that "jibes" with Mathematica. (* Define the functions in terms of parameters *) fun1[a_, b_][c_][x_] := a + b x + c fun2[a_, b_][c_][x_] := b + a x + c fun3[a_, b_][c_][x_] := fun1[a, b][c][x] + fun2[a, b][c][x] (* Specify the parameters' values *) a = 1; b = 2; c = {1, 4, 10}; (* Rather than loop, ...

1

Maybe the following? I didn't understand all the extra variables, so I stripped down the code more. In a complicated case, you might need Dynamic@Refresh instead of just Dynamic; see What is the point of Refresh if Dynamic has an UpdateInterval option? and related Q&A on Refresh. You'd probably have to put the output in a docked cell, since the FE ...

Only top voted, non community-wiki answers of a minimum length are eligible