Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Tag Info

New answers tagged variable-definitions

1

This sol=RSolve[{a[i]==1/Sqrt[w]a[i-1]+(2i-1-(2i+1))a[i-2], a==1/6(1/(2*w)+3-(2i+1)),a==1/(2 Sqrt[w])}, a[i],i]; a[i]/.sol[]/.i->4//Simplify instantly returns (24 + w^(-2) - 26/w)/12 and likewise provides a solution if you replace that 4 with 3 or with 5, etc. You could adapt this to use Table to provide your list of solutions. Check ...

1

Clear["Global`*"] (M = {{a, g}, {g, b}}) // MatrixForm U = (1/Sqrt) {{1, 1}, {1, -1}}; (M = U.M.ConjugateTranspose[U] // Simplify) // MatrixForm repl = Solve[{ w == (a + b)/2, d == (a - b)/2, p == w + g, m == w - g}, {a, b, g}, {w}][] (* {a -> 1/2 (2 d + m + p), b -> 1/2 (-2 d + m + p), g -> 1/2 (-m + p)} *) (M = M /. repl /...

1

Try ?NumericQ and assign the NSolve result to h h[r_?NumericQ, R_?NumericQ, l_?NumericQ, n_?NumericQ] :=h /. NSolve[ l^2 == r^2 + R^2 - 2 h^2 -2 Sqrt[(r^2 - h^2) (R^2 - h^2)] Cos[2 Pi/n] && h >= 0, h,Reals][] DensityPlot[h[r, 1, l, 4], {r, 0, 1}, {l, 0, 1}]

Top 50 recent answers are included