New answers tagged

0

GeneratedParameters should resolve Your problem. GeneratedParameters is an option to such functions as DSolve, RSolve, and Reduce.


2

The formula that you provided does not appear to correspond to the diffraction figures that you provided. I have provided an interactive plot for the formula that you provided. Clear["Global`*"] Manipulate[ Module[{plt}, d[λ_, f_, R0_, α_, ΔT_] := 1.22 λ f/(Quantity[R0, "Millimeter"] Sqrt[1 + 2 α ΔT]); Switch[calc, 1, α = 8.6*...


2

I came across this answer here https://math.stackexchange.com/a/3599697/775158. It's miraculous that it works, at least I think so. The resulting half-iterate $h$ is not perfect as $\forall x\in\mathbb{Z} : h(x)$ is not necessarily an integer. But it is true that $\forall x\in\mathbb{Z^+}: h(h(x))\in\mathbb{Z^+}$ and $h$ is monotone over the positive reals. ...


1

Here are equations with exact values: f := 16 ((-1 + x^2) Cos[z] Cosh[(π - 1/5) x] + 2 x Sin[z] Sinh[(π - 1/5) x]) Sinh[π x] + 8 (-1 + x^2) Sinh[x y] + (-3 + x^2)^2 Sinh[x (2 π + y)] - (1 + x^2)^2 (2 Cosh[2 (π - 1/5) x] Sinh[x y] + Sinh[2 π x - x y]); der = D[f, {{x, y, z}}]; der == {0, 0, 0} System of equations der == {0, 0, 0} has the ...


0

From PowerExpand section possible issues: This implies that the equation in this generality should not be solved despite there is a result! Assuming[{{Ys, Ki, Gs, Ks, \[Alpha], \[Epsilon], \[Eta]} \[Element] Reals, 1 >= \[Eta] >= 0, 1 >= \[Epsilon] >= 0, Ks > 0, Y > 0, Ki > 0, Gs > 0, \[Alpha] > 0}, Solve[Ys == ...


0

It may come as no surprise to many that Mathematica (excels in symbolic computation) is faster and more versatile than symbolic solvers in other languages (MATLAB, Python, etc.). If you're interested in calling Mathematica code from Python, see From Python to Mathematica and back again How to use Mathematica functions in Python programs? If you're looking ...


3

With NDSolve and Method -> "Shooting", I was unable to integrate past x = 2.93. With Method -> "FiniteElement", I was able to integrate as far as x = 7.5, but omega could only be approximated. In general, the problem appeared to be inadequate numerical accuracy near x = 0. The following worked much better. First, obtain ...


0

In my answer to the original plotting question, I made an educated guess (since it was not mentioned in the question) that the Fourier solution $$ V (u, v) = \sum_{n=0}^\infty \sqrt{\cosh v - \cos u} \cdot A_n \cdot P_{n - 1/2} (\cosh v) \cos(nu) $$ was constructed so that the $A_n$ were to be determined by the non-homogeneous boundary ...


0

The t/s is somehow a nasty in this question. The inequality chain make t/s limited by 0 and 1. 1 means t==s. At this point the equation reduces to Sqrt[1-p] and is satisfied only for p==1. Following this path replace u=t/s and solve the equation. p[theta_, u_] := 1 - (theta^u - theta)^2 Plot3D[p[theta, u], {theta, 0, 1}, {u, 0, 1}, AxesLabel -> Automatic]...


2

First we solve the system: s = Flatten @@ DSolve[{D[f[x, y, z], x, y, z] == 0}, f[x, y, z], {x, y, z}] /. C[n_][a_, b_] -> d[n][a, b] getting: {f[x, y, z] -> d[1][y, z] + d[2][x, z] + d[3][x, y]} Then we solve the original system equation for equation: sxyz = Join[ Flatten @@ DSolve[D[d[1][y, z] + d[2][x, z] + d[3][x, y], x, y] == 0, ...


3

The comment by user64494 suggested to me the following sxy = Flatten@DSolve[{D[f[x, y, z], x, y] == 0}, f[x, y, z], {x, y, z}] /. C[n_][z][v_] -> d[n][v, z]; sxz = Flatten@DSolve[{D[d[1][x, z], x, z] == 0}, d[1][x, z], {x, z}] /. C -> c; syz = Flatten@DSolve[{D[d[2][y, z], y, z] == 0}, d[2][y, z], {y, z}] /. C -> b; sxy /. sxz /. syz (* {f[x, y,...


2

ListLinePlot@ NDSolveValue[{x'[z] == 1, x[1] == 1, toroot[c[z], z] == 0, c[1] == cz[1]}, c, {z, 0.4, 5}]


4

You can simply add another function to NDSolve that counts the number of collisions. If you increment it each time a collision happens (i.e. inside the WhenEvents), you get the expected result: m1 = 1; m2 = 100^2;(*mess*) x10 = 9; x20 = 20;(*initial position*) v10 = 0; v20 = -1;(*initial velocity*) etot = m1 v10^2 + m2 v20^2;(*const energy*) tmax = 40;(*max....


3

Your problem is: given $a,d,z$, find a $c$ that corresponds to a root of $f(c)=a-cz_s\int \dots$. It happens that here, you want $f$ to involve numerical integration. d = 3; SeedRandom[2020]; a = RandomReal[{0, 10}]; toroot[c_?NumericQ, z_] := a - c*z^(d + 1)*NIntegrate[x^d*(1 - c^2*z^(2 d) x^(2 d))^(-1/2), {x, 0, 1}] cz[z_?NumericQ] := c /. FindRoot[...


2

General Solver Define Function(s) to Retrieve System of Equations Clear[P,V,n,R,T]; Rval=QuantityMagnitude@UnitConvert@Quantity[1, "MolarGasConstant"]; idealGasEqn := Module[{R=Rval,eqns}, eqns = {P*V == n*R*T}] Known Variables Case 1: P, V, and n are knowns (Solve for T) Pval1 = Quantity[1.5, "Atmospheres"]; Vval1 = Quantity[3, "...


2

If you want to use higher precision, you must start with higher precision, preferably exact numbers. So, define: rf = Rationalize[f, 0]; der = D[rf, {{x, y, z}}] {8 (-1 + x^2) y Cosh[x y] + (-3 + x^2)^2 (2 π + y) Cosh[ x (2 π + y)] + 16 [Pi] Cosh[π x] ((-1 + x^2) Cos[z] Cosh[(455324788 x)/154788525] + 2 x Sin[z] Sinh[(455324788 x)/154788525]) + 16 (2 x Cos[...


0

ContourPlot3D shows ( see @flinty 's comment) you, that there doesn't exist a pointwise solution near { 2.356 , 0.2 , 0.802 } f[x_, y_, z_] :=16 ((-1 + x^2) Cos[z] Cosh[2.941592653589793` x] + 2 x Sin[z] Sinh[2.941592653589793` x]) Sinh[\[Pi] x] +8 (-1 + x^2) Sinh[x y] + (-3 + x^2)^2 Sinh[x (2 \[Pi] + y)] - (1 + x^2)^2 (2 Cosh[5.883185307179586` x] Sinh[x ...


4

I like your "ugly way," but another way is use exact constants when using an exact symbolic solver: a = 8/10; b = 8; v = DSolveValue[{u[x] == a*(b*u'[x] + u''[x]), u[4925/1000] == 4, u'[4925/1000] == 625/1000}, u[x], x] // N (* -0.000851416 (0.780974 2.71828^(40.9101 - 8.15331 x) - 2208.78 2.71828^(0.153312 x)) *) One may omit the // N of ...


0

First the obvious part: performing the integral gives the equation $$ a = \frac{c z^{d+1} \, _2F_1\left(\frac{1}{2},\frac{d+1}{2 d};\frac{3 d+1}{2 d};c^2 z^{2d}\right)}{d+1} $$ Substitute $x=c z^d$: $$ \frac{a}{z} = \frac{x \, _2F_1\left(\frac{1}{2},\frac{d+1}{2 d};\frac{3 d+1}{2 d};x^2\right)}{d+1} $$ For any given value of $\frac{a}{z}$ satisfying $\left|\...


1

As stated in the comments there are infinite solutions. Perhaps you are looking for the "minimal" solution? Minimize [{x^2 + y^2, 3 x + 4 y == 1 + 5 s}, {x, y}] // Simplify (*{1/25 (1 + 5 s)^2, {x -> 3/25 (1 + 5 s), y -> 4/25 (1 + 5 s)}}*)


2

Are you trying to retrieve the values? E.g., vars = Catenate@Array[c, {6, 6}, {-3, -3}] (* your "variables" *) rules = Thread[Rule[vars, RandomReal[{0, 1}, 36]]] (* example rules *) vars /. rules (* retrieve values *) Or did you want to make some kinds of assignments? (If so, which?) For example, if you really (are you sure?) need all those ...


2

When ToRadicals tries to convert the Root object in your inequality, it knows nothing about the conditions on your parameters. To rectify this, you can make use of the undocumented Assumptions option of ToRadicals: ineq = Reduce[d>0 && n>1 && (Log[n]*(1/eps^2))^2/n <= eps d, {n, eps}, Reals]; ToRadicals[ineq, Assumptions -> d>...


1

Mind these are inequalities and not solutions! If the right-hand side is in the Complexes and the left-hand side is Reals the inequality does never hold. Both sides are not comparable. And in the example, the roots of -1 are on the unit circle around 0. The problem comes in with the application of ToRadicals on the result of Reduce. The result of Reduce is ...


0

You seem to be looking for the linear approximation. That is the first two terms of the Taylor series. For example: Normal[Series[(a + x) (a - x) (a - 2 x), {a, 0, 1}]] yields -a x^2 + 2 x^3


2

First, the matrix m is positive definite of all the determinant and sub-determinants are > 0. Second the Jacobi method will converge if the matrix is strictly diagonally dominant. That means in each row, the sum of the absolute values of the non diagonal elements is smaller than the absolute value of the diagonal element. In this case: 2 Abs[a] < 1 ...


2

Based on my answer to 229656, the solution is s = {A1 -> Function[{x}, Sqrt[P10] Exp[I α11 x (P10/2 + P20)]], A2 -> Function[{x}, Sqrt[P20] Exp[I α22 x (P20/2 + P10)]]} as can be demonstrated by Simplify[system /. s, P10 > 0 && P20 > 0 && (α11 | α22 | x) ∈ Reals] (* {True, True, True, True} *)


1

Taking Daniel's answer a little step further: your problem reduces to find the real numbers $(A_i)_i$ given that $$\forall u\in\mathbb{R},\ \sum_i^\infty A_i f_i(u,v_0) = 0$$ where the $f_i(u,v)$ are given by: f[n_][u_,v_] := (1/(2 Sqrt[-Cos[u] + Cosh[v]])) Cos[n u] Csch[v] * ((-1 + (1 + 2 n) Cos[u] Cosh[v] - 2n Cosh[v]^2) * ...


6

Edited to derive simpler expression for dd The symbolic solution requested in the Question is obtained as follows. eq1 = Expand[(r^2*A''[r] + 2*r*A'[r] - 2 A[r] + lambda^2*r^2*A[r] + 2 lambda*r^2*dd'[r])/r^2]; (* lambda^2 A[r] - 2 A[r]/r^2 + 2 A'[r]/r + 2 lambda dd'[r] + A''[r] *) eq2 = Expand[(r*dd''[r] + 2 dd'[r] + 3 lambda^2*r*dd[r] + 2 lambda*r*...


2

There seems something wrong with your question. First, note that you may differentiate every term separately. E.g.: term[n_][u_, v_] := D[Sqrt[(Cosh[v] - Cos[u])] A[n] LegendreP[n - 1/2, Cosh[v]] Cos[n u].v]; Then you may get the partial sum for v0 by: partialSum[nMax_][u_, v0_] := Sum[term[n][u, v], {n, 0, nMax}] /. v -> v0; This has the form (...


1

ClearAll[A, r, dd, sol3, sol4, lambda] sol3 = r^2*D[A[r], r, r] + 2*r*D[A[r], r] - 2*A[r] + lambda^2*r^2*A[r] + 2*lambda*r^2*D[dd[r], r] sol4 = r*D[dd[r], r, r] + 2*D[dd[r], r] + 3*lambda^2*r*dd[r] + 2*lambda*r*D[A[r], r] + 4*lambda*A[r] lambda = 0; s = NDSolve[{sol3 == 0, sol4 == 0, A[1] == 1, A'[1] == 1, dd[1] == 1, dd'[1] == 1}, {A, dd}, {r, 1,...


1

As noted by the OP in a comment above, the system of PDEs in the question has a solution. It can be obtained by assuming that D[ζ1[t, s], s] == 0, in which case the first equation requires that k must be a function of t only, and τ a function of s only. Inserting this result into the second equation causes it to simplify into two terms one a function of s ...


3

Does this count as a workaround?: (* dividing 2nd ODE by 1st yields a homogeneous ODE *) p2sol = DSolve[ {p2'[p1] == (2 p1 p2[p1] + p2[p1]^2) / (p1^2 + 2 p1 p2[p1])}, p2, p1] /. C[1] -> Log[C[1]] /. p_Power :> RuleCondition[p, True]; (* p2sol turns the p1'[x] ODE in the system into a separable equation *) PrintTemporary@...


7

The usual procedure for obtaining a Cartesian equation from parametric equations like yours is to use GroebnerBasis[] for eliminating variables: First[GroebnerBasis[Append[TrigExpand[{x == (1 + a Sin[2 t]) Sin[t], y == 1 - (1 + a Sin[2 t]) Cos[t]}], Cos[t]^2 + Sin[t]^2 == 1], ...


1

Do I understand your problem correctly: You have an implicit function of x and y: fu[x,y] == 0 that you can not solve for y. And you want to fit data in the form {{x1,y1},{x2,y2},..} to this implicit function. First, if possible, you may eliminate one parameter by dividing through it. Then you apply fu to your data, square and add the results. This is now ...


1

I am using MMA 12.1. If I run your code, I do not get any error messages. As a result I get the following plot:


1

It is not clear if $k_z$ depends on z or not. In both cases, you can try writing in the following way: f[r_, \[Theta]_, z_] := BesselJ[0, r Sqrt[\[Omega]^2/c^2 - k[z]^2]] S[k[z]] Exp[I k[z] z]; Grad[f[r, \[Theta], z], {r, \[Theta], z}, "Cylindrical"] with $k[z]$ taking into account for the dependance. The output is the gradient in cylindrical ...


2

Well done @yarchik. But Solve can show the solution in Reals with an extra option: Solve[(r^2 - 1)^3 == r^5 Cos[ϕ]^2 Sin[ϕ]^3, r, Reals] ({ {r -> Root[-1 + 3 #1^2 - 3 #1^4 - Cos[[Phi]]^2 Sin[[Phi]]^3 #1^5 + #1^6 &, 1]}, {r -> Root[-1 + 3 #1^2 - 3 #1^4 - Cos[ϕ]^2 Sin[ϕ]^3 #1^5 + #1^6 &, 2]}}) and even further Solve[(r^2 - 1)^3 == r^5 Cos[ϕ]^2 ...


2

For square ABCD, given $A(x_1, y_1)$, $B(x_2, y_2)$, $C$ and $D$ are easy to get, so we can reduce the number of unknowns to 4 Clear["`*"]; f[x_, y_] := (x^2 + y^2 - 1)^3 - x^2 y^3; pts = NestList[RotationMatrix[π/2].(# - {x1, y1}) + {x2, y2} &, {x1, y1}, 3] eqn = f @@@ pts sol = FindRoot[eqn, Transpose[{{x1, y1, x2, y2}, {0, 1, -1, 0}}]] ...


0

Even 8 unknowns are too much for Reduce, saying nothing about 6 parameters and nonlinear inequalities with Max. My best is a = 1; b = 1/Pi; β = 3; θ1 = 1/3; θ2 = 1/4; θ3 = 1/5; FindInstance[{a^2/(4 (b + c1 + s θ1)) + β ((a^2 (1 - p))/(4 (b + c1 + s θ1)) + p* Max[-F3 + a^2/(4 (b + c3 + s θ3)), a^2/(4 (b + c1 + s θ1))]) > -F2 + a^...


1

The problem is difficult to solve in Cartesian coordinates. But it simplifies a lot in polar coordinates. Let us first convert the given implicit equation into this form. We substitute $x=r\cos\phi$, $y=r\sin\phi$ and obtain $$(r^2-1)^3=r^5 \cos^2\phi \sin^3\phi.$$ This is an algebraic equation for $r$. Solve[(r^2-1)^3==r^5 Cos[ϕ]^2 Sin[ϕ]^3,r] Upon ...


1

With DSolve you get y[t] as an InverseFunction , diffucult to understand. Invert this function again with Solve to get t[y] in simple form you can plot with ParametricPlot . f = q2[t] - q3[t] // Together // Numerator dsol1 = DSolve[f == 0, y, t, GeneratedParameters -> (ToExpression[ StringJoin["c", ToString[#]]] &)] (* {{y -> ...


4

Amazingly, this system can be solved symbolically, at least for j2 = j1. How useful the answer may be is a different issue. If all symbols are real, then system (without initial conditions) can be rewritten as system = {p1'[x] == j1 p1[x]^2 + 2 j1 p1[x] p2[x], p2'[x] == 2 j2 p1[x] p2[x] + j2 p2[x]^2} where p1[x] = A1[x]^2 and p2[x] = A2[x]^2. (...


-1

FullSimplify[q2[t] - q3[t]] (-1 + 6 y[t]^2 Derivative[1][y][t]^2 + 3 y[t]^3 (y^[Prime][Prime])[t])/(3 y[t]^4) So the 3 y[t]^4 can be ignored for the solution. The term 6 y[t]^2 y'[t]^2 + 3 y[t]^3 y''[t] equals y[t]D[y[t]^3, t, t]. Good practice is to entered the equation that are close to standards or standards. So the homogenous equation can be solved by ...


-2

0 > θ1 > θ2 > θ3 >- 1 Reduce[{(a^2 c1 - a^2 c3 + a^2 s θ1 - a^2 s θ3)/(4 b^2 + 4 b c1 + 4 b c3 + 4 c1 c3 + 4 b s θ1 + 4 c3 s θ1 + 4 b s θ3 + 4 c1 s θ3 + 4 s^2 θ1 θ3) > q, a > 0, 1 > p > 0, s > 0, 1 > b > 0, 0 > θ1 > θ2 > θ3 > -1, c1 > 0, c2 > 0, c3 > 0}, {c2, c3}] /. ...


2

DSolve[y''[x] + (1 - (l (l + 1))/x^2 + 2/x) y[x] == 0, y[x], x] (*{{y[x] -> C[1] WhittakerM[-I, 1/2 (1 + 2 l), 2 I x] + C[2] WhittakerW[-I, 1/2 (1 + 2 l), 2 I x]}}*) without any restrict for $l$ or $x$ or $y$. This general solution offers the integration factors for matching the first requirement: Table[Limit[ D[FunctionExpand[WhittakerW[-I, 1/2 (1 ...


4

You are setting 0 > θ1 > θ2 > θ3 > 1 Which cannot be, as you are asking the numbers to be smaller than 0 and larger than 1 at the same time. Correct form should be: 1 > θ1 > θ2 > θ3 > 0 Which gives as an answer: 0 < p < 1 && 0 < θ2 < 1 && θ2 < θ1 < 1 && 0 < θ3 < θ2 && c1 > ...


1

In situations like this I use InverseFunction. Although it does not generate an analytical expression, you still end up with something which returns an exact result rather than an approximate one: lhsMinusRhs[c_, k_][u_, v_] := u-c^2 - u(1+4 c^2) Sin[v-2c Log[k (2 Sqrt[u-c^2]+Sqrt[4u+1])]]^2 assumptions[c_, k_][u_, v_] := u >= 0; uFunction[c_, k_][v_] := ...


2

The three PDEs eq1 = D[f[xm, xp], xm, xp] - 2 f[xm, xp]/(xm - xp)^2 == 0; eq2 = D[f[xm, xp], xp, xp] - 2 D[f[xm, xp], xp]/(xm - xp) == 0; eq3 = D[f[xm, xp], xm, xm] + 2 D[f[xm, xp], xm]/(xm - xp) == 0; clearly are satisfied by f[xm, xp] = 0. In fact, this is the only solution. As noted in the Question,DSolve cannot solve the three PDEs together. Indeed, ...


3

This will return what you want: Simplify[DSolve[{m v'[t] == m g - β v[t]^2, v[0] == 0}, v[t], t], m > 0 && g > 0 && β > 0]


4

You could use AsymptoticSolve. First, the zeroth order solution: y0 = y /. First @ Solve[Log[b/y]==(x/y-a)^𝛽/.a->0, y] Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. (-((x^𝛽 𝛽)/ProductLog[-b^-𝛽 x^𝛽 𝛽]))^(1/𝛽) Then using AsymptoticSolve: AsymptoticSolve[Log[...


Top 50 recent answers are included