Questions tagged [symbolic]

For questions about symbolic computation, as opposed to numerical computations.

Filter by
Sorted by
Tagged with
1
vote
1answer
95 views

Problem with Analytical Integration with Constant

Could you help me out on how to integrate this long equation with constant as it is indefinite integral so I assumed I could not use numerical integration (eg: Simpsons's 3/8 Rule or Trapezoidal Rule) ...
1
vote
1answer
64 views

GeneratedParameters in Integrate

I defined a function of two variables, let's say u[x_, y_] := 4 x^4 + 6 x y - 24 x^2 y^2 + 4 y^4 I want to partial integrate (with respect to y) the partial derivative of u with respect to x obtaining ...
3
votes
1answer
84 views

Pattern matching problems involving FullForm and Plus and Times

I am trying to match an expression that will be a sum of more than one terms, with the last one being a product. For example, the objecta+b+x*y. I am using the ...
3
votes
1answer
44 views

Type formation rules for 1-position expressions

I made a summary of the rules for formation of types for simple 1-position expressions, as I understand them. Here it is in textual form: A symbol, say, α, is a discrete entity, represented by a ...
0
votes
0answers
25 views

Why does explicit Dirichlet Transform of Liouville Lambda not evaluate?

I have four expressions for the Dirichlet Transform of the Liouville-Lambda function, but one form does not evaluate, any ideas why and what could be done?
3
votes
2answers
74 views

How to symbolically evaluate expression within If[]?

I have a function, say f, that needs to take one of two symbolic forms depending on the value of its inputs. This function is part of a very large expression, and I'...
3
votes
0answers
71 views

2D Poisson equation with Piecewise RHS - symbolic solution?

I'm trying to solve the following 2D Poisson equation symbolically: $$ -\nabla^2 u(x,y) = \begin{cases} 1-\text{sech}\left(\frac{w}{2 d}\right) \cosh \left(\frac{x}{d}\right) & -w/2 \leq ...
2
votes
1answer
56 views

Recursive computation of symbolic series

I don't have experience in Mathematica and I would like to use the ability it has to do symbolic computations to find the terms of a series of functions recursively. The terms I want to find are given ...
1
vote
0answers
57 views

Alternatives to NumericQ that allow symbols to be considered numeric

I am writing a program in which I am using NumericQ. I am trying to allow symbols to also be considered Numeric, so I have been using NumericQ[a]=True for all of ...
0
votes
1answer
49 views

Reduce coefficients from constraints in a set of equations

Total beginner here. I am chaining 4 quadratic equations $f_i(x)$ at 4 knots $k_i$ (where $0 < k_i < 1$ and $k_{i+1} > k_i$) on a wrapped unit interval (i.e. $0 \leq x \leq 1$): $$ f_i(x) = ...
1
vote
2answers
118 views

Mathematica's evaluation of nested summations

As suggested there, here is a copy of the question I've posted on Math.Stackexchange. Suppose we want to count the number of instructions executed by the following Python code: ...
4
votes
3answers
465 views

Useless result of Integrate

Considering a Fourier sine series, I calculate int = Integrate[Log[1 + Sin[x]]*Sin[i*x], {x, 0, Pi}, Assumptions -> i ∈ PositiveIntegers] ...
1
vote
1answer
41 views

Changing expression using a new variable definition

If I have an expression that looks like the following: $$ \frac{i \sqrt{\frac{\sigma _2}{\sigma _1}} \left(-\sigma _2 q_1(t){}^2+\sigma _1 q_2(t){}^2+\left(\omega _2-\omega _1\right) q_2(t) q_1(t)\...
0
votes
1answer
97 views

How to derive all KKT points of a parametric optimization problem

Suppose we have a symbolic optimization problem where all parameters and decision variables are nonnegative like the following problem. I would be thankful to know if there is any method to find all (...
0
votes
0answers
35 views

Getting the coefficients of an expression with Solve

I have a very lengthy expression (600+ terms) with derivatives of several functions, which I want to write in a compact way. I would like to get the coefficients of terms I know exist in this ...
0
votes
1answer
85 views

Symbolic partial differentiation of a Lagrangian function including a summation

I'm using Mathematica to double-check that I correctly derived first order conditions for the models I'm researching. Before I get started, I wanted to actually teach myself how to use Mathematica, ...
0
votes
2answers
190 views

Is it possible to calculate the desired area analytically?

I have the three two-variable curves $f,g,h$ with $0\leq x\leq \frac {\pi}{2} $ and $0 \leq y \leq \pi$ I use ContourPlot as ...
2
votes
0answers
33 views

Removing function arguments from expressions with derivatives

( This question is basically the opposite of this one: Variable dependency...easy one ) I would like to be able to output expressions in Mathematica that look more like pen-and-paper math. In ...
0
votes
0answers
18 views

Partially activate a derivative

Is there a way to make an inactive derivative do some amount of simplification? For instance, say I have Inactive[D][{{f,g},{u,v}},x] I would like ...
0
votes
1answer
63 views

How to simplify for a ratio of two variables

Say I have an equation like $$2 z \ln[\frac{a v_{2}^{2}}{b_{2}}]+(v_{1}-2v_{2}) - z \ln[\frac{a v_{1}^{2}}{b_{1}}]\geq0$$ ...
4
votes
1answer
83 views

Substitute known function's derivative

Suppose I know that the time derivative of $x(t)$ is $\dot{x}(t)=-x(t)$. I consider the function $V(x)=x^2$ and I want to compute the time derivative of $V$ along the trajectories of $x$, namely $\dot{...
1
vote
2answers
93 views

How to work symbolically with a compiled function?

I have a compiled function f to be used as a piece of a much larger calculation. I would like to expand out a function that calls ...
0
votes
1answer
137 views

Partial derivatives of this function

I have a function $y(x)$ which is the solution of the initial value problem - $y = \frac{1-y}{A} - \frac{y.|r(x)+m(x)|^2}{B}$ with an initial condition $y_0=1$. I solved for $y(x)$ using the following ...
2
votes
0answers
74 views

Inner polygon approximation

Suppose you want to perform an inner approximation of a planar semialgebraic set by a finite set of polygons. The following is a quick way to yield an approximation but I am not convinced that it is ...
1
vote
1answer
86 views

Reduce/Resolve without roots/radicals

Is there a way to convince Mathematica to perform quantifier elimination on a semialgebraic set and yield a resulting semialgebraic set whose representation does not involve any roots or radicals, i.e....
5
votes
1answer
121 views

DChange fails to change variables for 1D Schrödinger equation

I have a PDE (1D Schrödinger equation) as follows: Applying the following transformations to the PDE, we get the following ODE: I am trying to use @Kuba 's ...
2
votes
1answer
72 views

Why does the integration of this symbolic matrix slow down after compilation?

There's a symbolic matrix as the following. Why does the integration of the symbolic matrix slow down after compilation? How to eliminate the error information in red? Thanks. Note: The sample matrix ...
4
votes
1answer
139 views

How to speed up the calculation process of a symbolic matrix?

There are a symbolic matrix and a real number list. I'm going to replace the symbols of the matrix with all the elements of the list, and then to get the Eigenvalues...
4
votes
2answers
675 views

Where I am wrong?

I have an ODE: ( I want to write a code for Manuel solution algorithm) ...(Eq.4) STEP 1: Assume that the solution of ODE can be expressed by ...
1
vote
1answer
49 views

How to generate assumptions automatically for definite integrals?

In Mathematica, a trick to speed up the process of definite integrals is by adding assumptions. For example, the following codes run faster if we add such assumptions: ...
5
votes
2answers
184 views

Factorising blinear forms with Mathematica

Say I have some symbolic output that looks like the following: expr = A a1 b1 + B a1 b2 + C a2 b1 + D a2 b2 I would like to factorise this in the following way: ...
5
votes
3answers
330 views

How do you find information regarding the derivative?

I have been struggling with an issue that I believe has a simple way to solve. Given that I have extracted a term of a partial differential equation: f(1,2,0) [x,y,z]. In this case, it is similar to ...
0
votes
0answers
53 views

Can mathematica solve this analysis difficult problem ? "Functional" equation

Given two continuous functions $G,H: \mathbb R^+ \rightarrow \mathbb R$ such that $\frac{G}{H}$ is positive and strictly increasing, I am looking for two continuous functions $f_0, f_1 :[0,1] \...
5
votes
1answer
219 views

DSolve - incorrect solution to PDE

Bug introduced in 12.2, persisting through 12.3.1. I'm trying to solve a simple Schrödinger equation in external field: ...
0
votes
1answer
52 views

Solving coupled ODE symbolically for the parameters

I'm trying to solve the following system: $$ \dot{x_1} = -i w_1 x_1+ i s_1 x_2 $$ $$ \dot{x_2} = -i w_2 x_2- i s_2 x_1 $$ For $X(t)_{1,2}$, where $x_{1,2} = X(t)_{1,2}\cdot e^{ip(t)_{1,2}}$ I know ...
2
votes
0answers
46 views

Derivative of unknown functions and constants [closed]

I'm trying to do symbolic differentiation with Mathematica for expressions with unkown functions and constans. For example the following expression: $$\text{expr} = \omega_1 Q_1^2 Q_2 + \frac{Q_1^3}{\...
0
votes
0answers
43 views

Identity operator of unspecified dimensions

I would like to create a function which can can take a symbolic square matrix $m$ and returns $m \otimes I$. Where $I$ is the idenity operator of same dimensions as $m$. The actual function I am ...
0
votes
3answers
114 views

Simplification with User defined rules and assumptions

The results of DSolve are usually expressions that can be further simplified. For instance, consider the following expression for a co-ordinate of a particle in ...
0
votes
2answers
146 views

DSolve to obtain a tanh solution

We are given a simple ODE with BCs: $\xi^2 \frac{df^2}{dx^2} + f - f^3 = 0$ $f(x=0) = 0$ $\\f(x\to\infty) = 1$ On paper this is quite easy to solve. One can obtain the solution $f(x) = \operatorname{...
1
vote
1answer
145 views

how to define unit vectors in mathematica

I'm struggling a little bit trying to understand how to address this problem, I would like to do this in mathematica: is just that I don't know how to do the dot product between $\mathbf{J}$ and $\...
1
vote
1answer
139 views

Help with an integral

I want to know if the following integral can be evaluated in Mathematica: $$ g(t)= c\int_{0}^{1-t} t^{m-1}\left[(u+t)^{m}-u^{m}\right]^{n-2}(u+t)^{m-1} d u$$ where $$ c= m^2n(n-1)$$ ...
0
votes
0answers
27 views

How do I get actual solutions from MaxValue?

Say I want to calculate the maximum value of a simple function of two variables: f[r_, t_]:= r Cos[t]^3 (1 + r Sin[t]) with respect to the variable ...
0
votes
0answers
59 views

WolframAlpha gives small imaginary part for real integral $\int_0^\infty \log(1 - 2xe^{-x} - e^{-2x})\,dx$

Putting the integral $$\int_0^\infty \log(1 - 2xe^{-x} - e^{-2x})\,dx$$ into Wolfram|Alpha gives ...
0
votes
1answer
58 views

Help with the evaluation of an integral in Mathematica

I have the following (m and n are integers) $$ f[t] =\frac{ m^2n(n-1)}{2}t^2 \left(1 - (1 - t)^m \right)^{(n - 2)} (1 - t)^{(m - 1)} $$ $$ \text{Integrate}[f[t], {t, 0, 1}]$$ I also need the aymptotic ...
0
votes
0answers
94 views

Why can't Mathematica integrate my function?

I am very new to Mathematica and have been trying to integrate a function p[f] that is expressed as follows ...
0
votes
0answers
50 views

How to declare a list of symbols as Real numbers?

I have a list of symbols : gammaVecs =Table[Symbol[StringJoin["gamma", ToString@j, ToString@i]], {j,7}, {i, 40)}]; Which I want to use later in ...
0
votes
0answers
54 views

Strange behavior of FindInstance

I try to solve a problem from Kazakhstan math school competition (see it here in Russian) by ...
2
votes
1answer
89 views

Splitting product of $\gamma$-matrices into symmetric and anti-symmetric part

The $\gamma$-matrices satisfy the relation $$\gamma^\mu \gamma^\nu +\gamma^\nu\gamma^\mu=2\eta^{\mu\nu}\mathrm{id},$$ where $\eta$ is the Minkowski metric. Consider now the following process $$\begin{...
0
votes
1answer
52 views

A doubt about symbolic rational expression

I have this expression: $$PB=\frac{(R3 + R4) R6}{R4 R5 + R4 R6 + C2 R2 R3 R5 S + C2 R2 R4 R5 S + C1 C2 R1 R2 R3 R5 S^2 + C1 C2 R1 R2 R3 R6 S^2}$$ I need to put it in this form: $$PB=\frac{\frac{(R3 + ...
0
votes
1answer
55 views

How can I get the equation solution in the form of y1/y2 [closed]

I have some trouble getting the equation solution in the variable fraction form. If there is an equation set shows below: ...

1
2
3 4 5
28