Questions on the analytic and numeric equation solving functions of Mathematica (Solve, Reduce, NSolve, FindRoot, DSolve, RSolve, etc.).

learn more… | top users | synonyms (4)

2
votes
1answer
147 views

How can I exhibit the evaluation of formulas in a Mathcad-like way?

How can I create a function F that works like this: x = 2 f1 = x^2 + 3 f2=x+5 F[f1] x^2 + 3 = 2^2 + 3 = 7 ...
0
votes
1answer
228 views
1
vote
0answers
245 views

Differential equations: How do I solve a delay differential equation with 0-1 variables

How do I solve the following non-linear, delay-differential equations using Mathematica under the assumptions $$p(t) = 1 ,\; y(t) > k$$ $$p(t) = 0,\; y(t)<= \ k$$. $$ \frac{dw}{dt} = ...
7
votes
1answer
608 views

What are the algorithm details of FindRoot?

The Help page of FindRoot says: "by default, FindRoot uses Newton's method (Newton-Raphson) to solve a nonlinear system". But I ...
1
vote
0answers
248 views

Why DSolve and NDSolve give different answer

Consider these code, which solve the same equation using DSolve and NDSolve, why do they give different answer? Which one is ...
0
votes
1answer
138 views

Small problem at equation solving

I have $2$ equations in $2$ parameters which involve integrations. The limits of the integrals can not be defined analytically. They also require equation solving and eventually I couldnt incorporate ...
2
votes
1answer
104 views

Plotting the solution of a 2nd order equation

I have got to solve a second order equation, where the coefficient depend on the parameter $k$: $$(A_k - \omega) (D_k- \omega) - B_kC_k = 0$$ so that also the solution $\omega=\omega(k)$ will depend ...
2
votes
1answer
224 views

Solving System of Inequalities Relatively

I have been trying to figure out how to solve a system of inequalities relatively. I don't care about values, I just want all possible ordering. An example system might be:$${b > r,\; p > r,\; c ...
0
votes
1answer
218 views

NDSolve + FindRoot for Bessel Zeros

I am trying to use a solution given by Michael E2 in this topic: ...
1
vote
2answers
144 views

Symbolic matrix equation

I am looking to a system of equations of the form $\pi =\pi P$, the one encountered in Markov chain theory. My $P$ variable is: ...
3
votes
2answers
440 views

How to solve a “tensor equation”?

I am trying to solve equations which looks like this: $$ T_{ab} - T_{bc} = a_1 T_{ab} + a_2 T_{ac} + a_3 T_{bc}, $$ where $T_{xy}$ are tensors. I want to get the $a_i$'s (in this simple example ...
1
vote
1answer
95 views

How do I get Nsolve to work with hyperbolic functions?

This is a rather simple numerical solution, but it simply doesn't work. Does anybody have a solution? NSolve[x - Sinh[x] - 1 == 0, x] NSolve::nsmet: This ...
-1
votes
3answers
1k views

How do I determine the maximum value for a polynomial, given a range of x values?

I need to determine the maximum value for y = a x^2 + b x + c, where I know the coefficients and the upper and lower x values. ...
1
vote
1answer
228 views

General form of a linear transformation

Let $v_1 = \begin{bmatrix} 2 \\ -1 \end{bmatrix}$ and $v_2=\begin{bmatrix} 1 \\ -1 \end{bmatrix}$ and let $A= \begin{bmatrix} 3 & 2 \\ -2 & 1 \end{bmatrix}$ be a matrix for $T\colon \Bbb ...
1
vote
1answer
408 views

Solving a nonlinear system of recurrence equations

I am having two problems regarding Mathematica, and both of them are happening because it does not accept such inputs: ...
0
votes
1answer
72 views

Find the point that holds a given property

I have a normal distribution with mean 106, and a standard deviation of 8. I'm being asked to find the point that has the property that 25% of these values have this value or lower. What I've ...
0
votes
1answer
191 views

Solve Probability of Distribution

Why does this work: Solve[Probability[x <= t, x \[Distributed] NormalDistribution[]] == 0.95 ,t] But this doesn't: ...
2
votes
1answer
290 views

FindRoot giving false roots with Bessel Functions

I have read in some places about the errors associated with FindRoot, but the closest thing I can find on this website seems to be due to the imaginary unit. I am dealing with what should be a ...
-2
votes
2answers
358 views

Solving a system of nonlinear equations? [closed]

I'm relatively new to using Mathematica so I'm not sure if this is really even possible, but I figured it may be worth a try. In my Physical Chemistry class today, we were learning about acid/base ...
7
votes
2answers
240 views

Using NSolve in the complex plane

I am trying to find numerical values for $\Im\ e^{\frac{1}{2} +i\ y} = \Im\ \zeta(\frac{1}{2} +i\ y)$ for a given range. I have tried: ...
12
votes
2answers
976 views

How can I implement the method of Lagrange multipliers to find constrained extrema?

I want to form the function $h=f-\lambda_{1}g_{1}-\lambda_{2}g_{2}$ where $f$ is the function to optimize subject to the constraints $g_{1}=0$ and $g_{2}=0$ so that I can solve the first partial ...
-1
votes
1answer
145 views

Efficient Table Generation & NDSolve Error

I'm currently working on solving an SEIR model with data from the CDC. I've created a function to calculate the Square difference for the model and want to create a table of values for the 4 variable ...
1
vote
0answers
250 views

Solving asymptotic equations

Let's say I have several equations that have solutions given as a negative series $$y(t,x)=\sum_{n=-1}^\infty a_n(t) x^{-n}=a_{-1}x+a_0+a_1x^{-1}+\mathcal{O}(x^{-2})$$ My equations look like ...
1
vote
0answers
80 views

Simple Solve example fails: why? [duplicate]

Solve is an amazing tool, but sometimes it doesn't work in the way I expect it to. The particular instance that is confusing me right now is this: ...
0
votes
1answer
160 views

Plotting a function only non-zero for discrete values of argument

I have a function like: $$ f(E)= \Sigma_{n=0} \Sigma_{\ell=0} \, \delta\left(E+\frac{\ell+2n+2} {R\sec{\rho}}\right) w(n,\rho,\ell)\,, $$ i.e. the function is zero unless $$ ...
1
vote
1answer
208 views

Gram Schmidt inner and outer products

I know the Gram-Schmidt orthogonalization generates an orthonormal basis from an arbitrary basis. I need help with: Write a program that inputs a list $\{b_1,\dotsc,b_n\}$ of linearly independent ...
2
votes
1answer
168 views

Numerical errors/inaccuracies in ProductLog

Context In cosmology, a fairly accurate model to describe the gravitational potential, $\psi(r)$ of dark matter halos is given by $\psi( r)=\log(1+r)/r$. ...
0
votes
0answers
69 views

Parallelising the solving of polynomials

I'm working on finding solutions to a, not so very nice, system of equations. They are all polynomials of degree $4$ with $5$ parameters and all terms are of even order. I'll post the code on request, ...
1
vote
1answer
94 views

Solve failing and not clear why

I define the function: w[q_, n_, a_] := q/(4 Pi n r^2) (1 - Exp[-2 r/a] (2 (r/a)^2 + 2 (r/a) + 1)) I then want to solve: ...
5
votes
2answers
288 views

Intersection of two splines

I have a collection of sets of points, each set defining the segment of a (nice) curve on the unit sphere $S^2 \subset \mathbb{R}^3$. The points are computed numerically. I now want to compute the ...
2
votes
2answers
143 views

Incorrect numerical derivative of function that uses FindRoot

I am trying to plot the derivative of function g[x] below where g[x] is defined as the root of another equation. However, I am ...
0
votes
1answer
63 views

Issues FindRootPlot command

I've had some fun playing around with FindRootPlot for a simple system of equations: ...
2
votes
0answers
116 views

Question about Solve

I don't understand what Mathematica is doing to get these solutions. I ask it to solve two equations, the left hand side of both expressions are the same, the right hand sides differ by a ± sign. I ...
7
votes
1answer
410 views

Issue with the NDSolve code

With this procedure, one may determine an eigen-value function $R(a)$ for any given $\Xi$ (say 0, 25, 50, 75, 100) ...
4
votes
2answers
113 views

Non-convergance of the solution of the 1+1 partial differential equation

I am stacked with a partial differential equation as follows: This is the $\LaTeX$ expression for the equation $$ \frac{\partial y}{\partial t}=\frac{\partial^2 y(x,t)}{\partial x^2} ...
3
votes
3answers
139 views

Find $Y \in (0, 5)$ such that the roots of $4x^2 + 4xY + Y + 2 = 0$ are real?

The problem is to find all $Y \in (0, 5)$ such that the roots of $4x^2 + 4xY + Y + 2 = 0$ are real. I took a straightforward approach with Mathematica with the intent of listing the only solutions ...
0
votes
1answer
358 views

DSolve to solve a system of differential equations [duplicate]

I need to solve a system of differential equations as follows: ...
5
votes
0answers
78 views

Using quantifiers with free indices as declarative conditions in equation solving

This is a toy example: Is there a way to rewrite ...
6
votes
1answer
160 views

The third argument of the Root function

Consider the roots of an arbitrary indecomposable polynomial: sol = Solve[x^5 + 2 x + 1 == 0, x] The returned expression is ...
1
vote
1answer
172 views

Solving an exponential multivariate equation

I have the following equation: p = 1/(1 + E^(-51.179 + 0.849 x1 + 2.3649 x2 + 1.155 x3 + 1.46 x4 + 1.31 x5)) and I want to find the set of values for x1 to x5 ...
0
votes
1answer
142 views

How to return the rhs of a transformation rule from within Compile[]

I have defined the following function: ...
0
votes
1answer
204 views

Solve[polynomial, x, Reals] doesn't get all real roots or correct ones?

My main confusion is about the difference between the two code blocks at the end of this long spiel, but the spiel contains the code to create the polynomial if its coefficients are helpful for ...
0
votes
1answer
116 views

Manipulating and using result of DSolve

I have an unsightly looking equation that nonetheless has an analytical solution. The solution is ugly as hell, but exists; I use the following code with the DSolve ...
3
votes
1answer
178 views

When does the real part of Zeta vanish on the critical line?

This seems to be a quite a simple problem but I cannot make it work. I am trying to find all values within a given range for which the real part of the Zeta function vanishes on the line: ...
1
vote
3answers
144 views

automatic processing of numerical results in `Plot`

First I want to solve an equation $F(x,y)=0$ for $y$ by supplying a value of $x$. (suppose obtaining the analytic form of $y(x)$ is too difficult) Then I want to plot root $y$ (numerically calculated) ...
1
vote
1answer
512 views

Singularity / stiffness / precision errors with NDSolve

I have a relatively simple 2nd Order ODE problem I'm trying to solve numerically $p'' + \frac{1}{r}p' = A(\frac{p(r)}{p(r) + k_{m}})$ where $A = 7.5795*10^9$ and $k_{m} = 1$. So trying to get ...
1
vote
0answers
38 views

How can I access numerical values of variables calculated with Solve? [duplicate]

I am trying to calculate some thermodynamical cycles so I often use lists with equations. Here's a simple example: ...
1
vote
2answers
181 views

Setting up and solving system of equations

Consider the following code: ...
1
vote
2answers
137 views

ReplaceAll a list of rules to an equation

Given the following equation and rule, how would I Solve the equation for tr, k and ...