All Questions

58,666 questions
3 views

How to manipulate a differential equation in Mathematica?

As a neophyte, I'm trying to manipulate the result of a differential equation but I have no idea how to do so. Here is the equation: I know how to find the solution, which is but after that I ...
5 views

Functional derivative

To test the VariationalMethods toolbox, I tried to compute $\frac{\delta I[y]}{\delta y(x)}$ for the following functional (assuming $w(x)$ is some well-behaved ...
18 views

I believe I got the syntax for the code right, but the plot isn't showing for me. ...
27 views

Mathematica package, and ::usage

When making a package, I find it a bit difficult to remember to add functions as public, and update the ::usage tag. Is there some neat trick to automatically ...
27 views

Why does choosing the method break the parallel computation?

I have a workable function with using NDSolve with predefined method for solving. But for some reasons I should use the parallel computation. The main problem is that the NDSolve can't build the ...
17 views

Import date and number Matrix Formatted as text

Hi I am new to Mathematica. I have a large text file that looks like: {"i":"2008-02-22","v":"9.102"},{"i":"2008-02-23","v":"11.14"},{"i":"2008-02-24","v":"12.21"}.....
26 views

Why does Export not raise an error message?

Why does Export["str", str, "Table"] not evaluate to an error, where str is any expression?
21 views

Manipulate Flatten function in a TreeForm

I want to visualize work of Flatten function, and add a slider, so you can change the level of flattening. Here is the list of lists I'm using and Flatten function. ...
43 views

Using Image Transformation to create image sky view of what its like to be near black hole (Not a wormhole)

Question : I am trying to carry out point 3. "Implementing map" on page 13 in the paper Interstellar wormholes however am not 100% sure on how to go about generating the numerical table of values and ...
56 views

How to create this doge fractal zoom?

I would like to learn how to recreate this fractal in Mathematica and make others in the same style: https://m.imgur.com/r/FractalGifs/lYEK8Cd
22 views

Meson build system + C/C++ LibraryLink, help needed for portability check/fix (Windows &MacOs)

As a proof of concept I have created a github repository that shows how to: use the Meson build system to create a Mathematica package using LibraryLink functions The goal is to provide an easy to ...
22 views

Map a function at the lowest level [on hold]

How do I map a function to the lowest level of any given nested list? As an example, how do I create output from input in the ...
38 views

I've written a function that returns the steady state given a regular, column-stochastic matrix. I want to use it to solve a larger problem, finding steady states that satisfy certain conditions. The ...
32 views

How do I declare a countably infinite list of variables as being integers?

I want to do this, Solve[ { n1 + n2 + n3 + .... = 10, n1 + 2 n2 + 3 n3 + .... = 100}, {n1,n2,n3,....}, Assumptions -> {n1,n2,n3,.... are Integers >=0} ] ...
34 views

Solve can't find a solution for transcendent equation

I'm trying to solve a system of equations. The problem I'm encountering is that one equation is transcendent and Solve is unable to find a solution for it and so can't find a solution for the system. ...
28 views

NDSolve diffusion equation NDSolve::ndnum

I'm trying to solve a PDE. My code is: ...
34 views

How to prove that there are infinitely many primes? [on hold]

How do you prove that there are infinitely many primes?
142 views

How to Build a List from Separate Lists

I suspect this is a duplicate, but I can't seem to find what I'm looking for. A routine problem I have is the following. I have a set of data in three (or two, or more) lists: ...
88 views

Resorting data from a multidimensional list

I have a dataset that is generated in a 4D table. A snippet would look something like: {{{{x,y},{x2,y2},...}...}...} and so on, in code form: ...
18 views

Extract time component from date in a dataset

I have a dataset of dates in the following format - Wed 18 Feb 1801 18:00. I want to extract only 18:00 from these dates i.e, the time component only. How do I go about doing so?
15 views

Use NETLink to call C# code that uses packages from nuget

I can successfully load and run methods of a static class I have written in c# using: ...
43 views

Specifying $0^+$ as the lower bound of an integral

Consider the following evaluation. Integrate[1/Sqrt[x], {x, 0, 1}] (* 2 *) The integral is right only if the first extreme of integration is $0^+$. I want to ...
62 views

Writing a function with a domain that is a finite range of integers

I want to write a conditional function defined for $n=[-5:5]$. Explicitly, $\qquad Z_n=A e^{ikn}+Be^{-ikn}$ for $n\leq1$ and $Z_n=T e^{ikn}$ for $n\geq2$. I have written it but it is not very ...
14 views

Multiplication of Two Vectors Not working correctly [duplicate]

I am trying to simply multiply a 1x2 vector by its transpose however Mathematica is not performing this action correctly. When I change to 2x2 matrices the multiplication works correctly however. My ...
41 views

How to make a table for loops?

I have a code given by ...
29 views

How to fully display text in the text box of Manipulate control when expanded?

When the control of Manipulate got expanded there's a display text box but it does not fully show the control value as shown in figure. Is there any way that the size of this box can be adjusted to ...
569 views

What's the meaning of #0?

Here's a line of code from a handbook written by Stephen Wolfram, which turns out to be very complicated for me. ...
9 views

problem with FeynCalc abbreviations

I am new in feyncalc and I am trying to do a one loop calculation using feynarts-feyncalc. In my final passarino-veltman reduced result I've got coefficients "gc7,gc11,gc9" I guess these are ...
62 views

How can I solve these coupled differential equations?

How do I solve the following system of ODE's? $\qquad \frac{dx}{dt}=\{-(n+1)r_1+(m+1/2)r_2\}x+n\,r_1y$ $\qquad \frac{dy}{dt}=-\{(n\,r_1+(m+1/2)r_2\}y+(n+1)r_1x$
62 views

How to use Solve properly

I'm attempting to solve the following system of equations for k and $\kappa$ $$\mu\epsilon\omega^2=k^2-\kappa^2$$ $$\mu\sigma\omega=2k\kappa$$ but when I type into Mathematica ...
14 views

ScrollPosition Synchronization

Two separate Panes. Pane-1 with vertical scroll bars and Pane-2 no scroll bars. Need to sync the scrolling between them. When scrolling Pane-1 vertically, need to have pane 2 automatically scroll to ...
87 views

Not sure how to set up the Laplacian/Poisson Equation

As stated, I am having trouble trying to set up a Laplacian/Poisson Equation. I have boundary conditions with this too, and I've tried using the DirichletCondition function, but I don't know what I'm ...
34 views

using Apply to get iterated Sum

Suppose I want to sum a function, $f(\{m_a\})$, of several variables, $m_a$, $a=1,..,n$, which run over ranges, $1,...,k[[a]]$, however, I do not know $n$ in advance. I thought I could do this using ...
16 views

Defining a differential operator that acts on a non-commutative basis

Given a non-commutative basis ${x_0,x_1,x_2}$ I'd like to define a differential operator that acts as so  \Delta_i (\sum_{n=0}^\infty c_n x_i^n) = \sum_{n=1}^\infty c_n x_i^{n-1}, \quad \Delta_i ...
1k views

How Create a list of the first 10,000 digits of Pi and sum it?

I need help for a problem I m having trouble with. I need to create a list with the first 10'000 digits of Pi and sum the digits 259 to 7233. I managed to create a list with the following code: list1 ...
38 views

38 views

Replacement rule for terms that are separated by operators?

My main problem is how one can create a "transcending between operators rule" in the same term according to the minimal example bellow. Suppose I need to perform a replacement of the form ...
24 views

How can I efficiently call an external Python script that needs to run continuously?

I am writing a Mathematica program that tries to run 100+ Python programs, via StartProcess[], continuously. It seems to work when I run < 100 programs, but, at ...
21 views

Manipulate and Graphing Multiple Functions on the same Axis [duplicate]

Can Anyone help me out graph both function and its tangent line on the same xy axes, please? ...
43 views

Distance between axes and tick labels

A similar question has been axed before in the context of a Framed plot: see here. My plot is unframed so I wasn't able to apply the answer to the other question. I create a histogram with the code ...
38 views

Problems with continously varying Tube radius

Problem I am trying to plot Tubes made from the Tube function with varying radii. At one point there is a discontinuity and the radius of the tube is much ...
69 views

Why are there local variable conflicts in my recursive function definition?

Sorry to post a long piece of code. There are two places in here where I Print[] 'path2' when the count == 984, because for some reason, that list is getting ...
29 views

Attempting PDE with inequality in boundary condition

I am attempting to solve the equation below, which requires v[y,0]==0 for all y greater than 0. I have followed the /; approach ...
27 views

Subscripted variables with changing subscript

Using the Notation package to symbolize subscripted variables: Needs["Notation"] Symbolize[ParsedBoxWrapper[SubscriptBox["_", "_"]]] Now, if I wish to do a ...
40 views

Variables with both super-subscripts on the same vertical axis

When writing out a variable with both a subscript and a superscript, such as: Subscript[Superscript[f, a], b] one has that the "b" letter is "pushed" to the ...
294 views

Multiplying elements of a list

Given I have a following list of numbers: l={2,3,4,5,6} I wonder how to multiply each number by the one before of it, such that I get ...
38 views

Associate vertex coordinates and labels

This sounds easy (in which case I will delete my question) and maybe I am getting a bit tired, but I can't find an easy way to create a list from an automatically-generated graph where vertices labels ...
140 views

How can I use a Module anonymously as the function for /@?

I've looked for a similar question but the one that came up first has no answer, so please bear with me as I am a complete newbie to Mathematica. My ultimate goal is to generate custom ticks for a ...