Tag Info

14

The "canonical" way in Mathematica is f[x_, y_] := x^2 + y^2 g[x_, y_] := x^4 + 4 x y + 2 y^4 - 8 Maximize[{f[x, y], g[x, y] == 0}, {x, y}] If you want to make explicit usage of the Lagrange multiplier: ss = N@Solve[Grad[f[x, y] + λ g[x, y], {x, y}] == 0 && g[x, y] == 0, {x, y, λ}, Reals] gives the {x, y} coordinates of the maxs and mins. ...

9

Is this what you want? Clear[Derivative, h]; h[0] = 1; (* to avoid division by zero with OP's example R *) Derivative[1][h][s_] := Block[{Derivative}, h'[\[FormalS]] /. First@Solve[ D[R[a + h[\[FormalS]]] == - \[FormalS], \[FormalS]], h'[\[FormalS]]] /. \[FormalS] -> s ]; Derivative[n_][h][s_] := D[Derivative[n - ...

9

However, is there something you can put in the code to set the speed? Animate takes an option AnimationRate I still haven't been able to draw the bottom part of the first animation on https://courses.engr.illinois.edu/tam212/avt.xhtml#avt and note how it continues to move to the right (without everything jumping around). I think you can get as ...

7

This should be a comment, but it's too long... This isn't really a Mathematica solution, but here's some insight into the integral. I assume all parameters are positive. Call your integral $I$ and let $s = b^2/(2c)$. Substituting $t = \sqrt{x}$ transforms $I$ into the Laplace transform  I = \frac{1}{2} \mathcal{L}_t\left( J_0(n \sqrt{t} \,) \theta(a^2 - ...

6

EDIT : Corrected error. Clear[list]; list[n_] := Range[n, 2, -1]; x = Sqrt[1 + Fold[HoldForm[(#2^#2 + #1)^(1/#2!)] &, 0, list[5]]] x // Map[ReleaseHold, #, {0, Infinity}] & // N // InputForm 1.8430759846682

6

MyLine is embedded in 2D space, thus for $x\in\text{MyLine}$, x is a 2D point and Sin[x] just makes no sense. You probably meant the interval Interval[{-Pi,Pi}] instead, which I think should work. But it doesn't. I don't know why. Maybe a bug? In[27]:= MaxValue[Sin[x], x \[Element] Interval[{-Pi, Pi}]] During evaluation of In[27]:= MaxValue::objfs: The ...

5

list1 = {a, b, c, d}; Rest[FoldList[Times, 1, list1]] Scan[Print, %] a a b a b c a b c d

5

Here is an approach using FixedPoint, where I keep the output in exact form to see how many terms are needed to satisfy a given tolerance: Clear[x]; step[{n_, f_}] := {n + 1, f /. x -> (n^n + x)^(1/n!)}; tolerance = $MachineEpsilon; sum = Last@FixedPoint[step, {2, Sqrt[1 + x]}, SameTest -> (tolerance > Abs[Last[#1] - Last[#2]] /. x ... 5 Adding the assumption that x is real (which it is in this case) and then simplifying allows Mathematica to compute a symbolic answer:$Assumptions = Element[x, Reals]; Integrate[-((I PolyLog[2, x - x^2])/(Sqrt[3] (-(1/2) - (I Sqrt[3])/2 + x))), x]; Simplify @ %; Limit[%, x -> 1] On 10.1 these commands yield the following (after some computation time): ...

4

Edit: material reordered for clarity The formal definition of the PolyLogorithm is Sum[z^k/k^n, {n, 1, Infinity}], which converges for Abs[z] < 1. Thus, the integrand can be integrated term-wise. summand = Integrate[-I (x (1 - x))^k/(Sqrt[3] (-(1/2) - (I Sqrt[3])/2 + x)), x] // FullSimplify (* ((-1)^(1/6) x^(1 + k) AppellF1[1 + k, -k, 1, 2 + k, x, ...

4

The purpose of this answer is to give simple, clear answers to the simple component questions, How to draw an infinite tangent line? How to draw an infinite secant line? I will use the V10+ InfiniteLine, which Mr.Wizard has already pointed out as a way to draw an infinite line. See also the Note below. How to draw a tangent line Round about the eighth ...

4

f[1, x] = (1 + x)^(1/2); f[n_ /; n > 1, x] := f[n - 1, x] /. x :> (x + n^n)^(1/n!) The above function can generate terms of the series. For example $\quad \quad f(3,\,x)=\sqrt{1+\sqrt[2!]{2^2+\sqrt[3!]{3^3+x}}}$ $\quad \quad f(4,\,x)=\sqrt{1+\sqrt[2!]{2^2+\sqrt[3!]{3^3+\sqrt[4!]{4^4+x}}}}$ f can be used to study the convergence of the OP's ...

3

As pointed out by Artes, this integral has meaning only under Cauchy principal value. Luckily, NIntegrate has this strategy (explained here): NIntegrate[(4 Cos[\[Theta]] Sin[\[Theta]])/(1 - 16 Cos[\[Theta]]^4), {\[Theta], 0, \[Pi]/3, \[Pi]/2}, Method -> "PrincipalValue"] 0.127706 Note that the position of the sigularity has to be specified in the ...

3

My comment in Manipulate form: func = {x^2 + x y + y^2}; Manipulate[ D[func, variable], {variable, {x, y}} ] The control that Manipulate uses is the SetterBar[Dynamic[variable], {x, y}] of my comment.

3

The idea is to let x = 1 + eps, expand the integral (antiderivative) into a series with respect to eps, and then let eps -> 0. Mathematica 10.1 quickly returns the result to which some "beautifying" was done afterwards by hand. Here's the code FullSimplify[ Limit[Series[ Integrate[-((I PolyLog[2, x - x^2])/(Sqrt[ 3] (-(1/2) - (I ...

3

My version of Bob Hanlon's comment solution: list1 = {a, b, c, d}; FoldList[Times, list1] % // Column {a, a b, a b c, a b c d} a a b a b c a b c d Reference: Shorter syntax for Fold and FoldList?

3

You can also use Accumulate list1 = {a, b, c, d}; Times @@@ Accumulate[list1] (* or Accumulate[list1] /. Plus -> Times *) {a, a b, a b c, a b c d} ... or ReplaceList: ReplaceList[list1, {x__, ___} :> Times[x]] {a, a b, a b c, a b c d}

2

Replace m by μ/λ to impose the condition m λ = μ. I assume r = {x, y, z} and k = {0, 0, 1}; then you want Norm for vectors, since Abs is for complex/real numbers. Block[{r = {x, y, z}, k = {0, 0, 1}}, Limit[-m ((Norm[r + 1/2 λ k] - Norm[r - 1/2 λ k]) / (Norm[r + 1/2 λ k] Norm[r - 1/2 λ k])) /. m -> μ/λ, λ -> 0] // Simplify[#, r ∈ ...

2

r = {x, y}; a = {a1, a2}; expr = 1/Sqrt[(r - a).(r - a)] - 1/Sqrt[(r + a).(r + a)]; (Series[expr, {a1, 0, 1}, {a2, 0, 1}] // Normal) /. x^2 -> R^2 - y^2 // PowerExpand // Factor (* (2 (a1 x + a2 y))/R^3 *) Have fun!

2

For Question 1: See the answer here. The number following AnimationRate should be the rate (per second) you want your parameter to increase. For Question 2: You can do this via judicious use of GraphicsGrid, Max, and the PlotRange and AxesOrigin settings of Plot. If we define trange as the amount of time you want visible on your axes, then the following ...

2

Line defines a 2D region, therefore MyLine = Line[{{-Pi, 0}, {Pi, 0}}]; MaxValue[First@Sin[{x1, x2}], {x1, x2} ∈ MyLine] or MaxValue[Sin[First@{x1, x2}], {x1, x2} ∈ MyLine] or MaxValue[Sin[Indexed[x, 1]], x ∈ MyLine] would be the correct syntax. But it's much simpler to use MaxValue[{Sin[x], -Pi < x < Pi}, x]

1

This should produce the desired dialog loop pdGUIstyled[func_, outputList_: {}] := Setting@DynamicModule[{variable}, Module[{symboles = Cases[func, _Symbol, Infinity] // DeleteDuplicates, lastRes}, lastRes = DialogInput[ Column[{ Row[{"the function is: ", Panel[func, Background -> White]}], "", Row[{"the current list of ...

1

One approach is as follows. First note that 0 <ArcTan[(600 - z), 155] < ArcTan[(100 - z), 155] < 2 Pi, which allows the Conditional expressions to be eliminated. Plot[{ArcTan[(600 - z), 155], ArcTan[(100 - z), 155]}, {z, 0, 750}] Then the Integrals can be performed as follows: Assuming[2 Pi > x2 > x1 > 0, With[{A = 1/137, B = 1, p = ...

1

So upon thinking about this more and playing with different assumptions when trying to integrate the above function(s), what I found was the following - $\int_{a}^{\infty} dt \frac{e^{i k t}}{t + i \tau} = e^{k\tau}\,\Gamma\left(k(-ia + \tau) \right)$, where $\Gamma$ is the incomplete Gamma function. Now, suppose I try doing this integral with ...

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