# All Questions

121 views

### Why does Mathematica show 4095/4096 terms in TrigExpand?

Clear[x, n]; expr = Cos[x]^(n - 2) (1 - Cos[x]^2 + Sin[x]); r=TrigExpand[expr] Where do those 4095/4096 comes from? It is correct, but it seems very strange ...
120 views

I would like to execute a block of code whenever the FrontEnd quits. I know about $Epilog, but it seems that this would execute every time the kernel quits, which ... 1answer 105 views ### Plot 2 student T distributions with different center values Plot 2 student T distributions with different center values µ, but same DOF. The center values,µ has to be 45 and 48, DOF shall be 9. 1answer 43 views ### Is there a limit for DensityHistogram data amount? I'm trying Mathematica for first time and while trying to do a Density Histogram with around 300 000 points, I get an error "THE INPUTED DATA is not a valid dataset or list of datasets." Maybe it's ... 0answers 136 views ### Speed up replacement using Rule Dispatch Associtation I knew that this has asked many times, but I hope there is something more could be done to speed this up. The expression kappa is here. ... 1answer 496 views ### Fast matrix multiplication in MMA and GPU Matlab multiplies two 3000by3000 matrix around 0.18s faster than MMA. While for just a few matrix multiplications the speed difference is not important, it becomes crucial when I want to do those ... 0answers 92 views ### Trying to Simplify an Expression I'm trying to simplify an expression: ... 1answer 277 views ### Aristic rendering of breaking waves from a Japanese panel Any insight to model and render the breaking waves in the style of this - likely Japanese or possibly Korean panel? Line drawings are acceptable, not necessary to replicate all the details like ... 4answers 1k views ### How to create a histogram from a given frequency table I wanted to draw a histogram as in the photo above, I typed the command: ... 0answers 94 views ### How do I apply assumptions to a module (or any CompoundExpression)? Edit: I am looking for a way to apply assumptions to all expressions contained in a compound expression. For example, ... 5answers 807 views ### Gap in a continuous plot Why do I get a gap in the plot below and how can I fix it? (If you are interested in it, you can see a new related question: How to plot an implicit value funtion, which is also a little chanlenging) ... 0answers 87 views ### ViewPoint: Saving coordinates in a text file How should I save (Export?), all coordinates of the ViewPoint, in a text file when I rotate the ... 1answer 129 views ### Toroidal implicit region looks weird I have the following toroid surface: ... 2answers 111 views ### Sum considers RandomInteger[] as a constant Perhaps this is expected behavior, but I was kind of surprised by the following: ... 2answers 134 views ### How to fit points in a picture using locators I've got a problem doing some analysis work on some of my spectra. I am basically looking for features that look like parabolas. In need of a tool to quickly find two parabolas in a spectrum (they are ... 2answers 83 views ### Solving coefficients of a function having boundary conditions I have a function F=c+dz, which has particular boundary values, say F(z=1)=2 and F(z=-1)=1, ... 1answer 1k views ### How to map an image to get an illusion of 3D I would like to distort or map a given jpg so it looks 3D when viewed from certain angle, as in the following youtube video: http://www.youtube.com/watch?v=IfCCUd8mFtg. The most interesting part of ... 1answer 146 views ### Polar image plot I would like to perform the polar plot of an electron microscope contrast transfer function, into a black and white image. I have used the equation ... 1answer 54 views ### Help for properly writing simple derivative expression I need help to write the following expression (only 1 iteration): f(x) = ...some basic function... f[X0,...,Xp] = f(p)(x0) / p! What I have so far: ... 3answers 712 views ### How can I calculate the perimeter of an equation-defined curve？ This is how the curve looks like: ... 1answer 65 views ### How to make Association reflect new assignments How do I get Association to act like List in the following? ... 1answer 215 views ### Why does Mathematica not simplify this expression? Consider this simple example: ... 2answers 129 views ### FullForm applied to functions I would have expected FullForm[Cases[{a^2, a^3}, a_^1]] to produce Cases[List[Power[a, 2], Power[a ,3]], Pattern[a, Blank[]]]... 4answers 217 views ### Problem with ContourPlot [Not smooth curve] [closed] Here is my code ... 2answers 125 views ### Why does Rule behave like this? Why does {x, x^2, x^3, a, b} /. x^n_ -> f[n] result in {x, f[2], f[3], a, b} when ... 2answers 855 views ### Resolution problem of ContourPlot I met a tricky problem with ContourPlot, which is when I change the range of my variable, I get a totally new figure. For example: ... 4answers 242 views ### Extract Specific Dates from DateList Hopefully this is an easy question but I couldn't find an easy answer anyway. Surely there is some simple way to splice this... I want to take a large datelist in the format of {{2014,12,31}, value} ... 2answers 147 views ### Using ListPlot and lists of Associations I have a list of associations : ... 2answers 56 views ### Matching exponents using Cases[] I have a question regarding pattern matching. Can anyone explain the results i get ? Cases[Table[x^n, {n, 1, 10}], a_^1] Which gives the following result. {x, ... 2answers 74 views ### trouble with adding a legend to a plot I am having trouble with adding a legend to a plot. this is my code,I tryed to use serval things,like ... 1answer 185 views ### How effectively Mathematica calculates Sum[Sum[a_k k^m, {m, 0, n}], {k, 1, p}] as a function of n? Suppose that I have a polynomial of order$n$$$f_n(k)=\sum_{m=0}^n a_k k^m,$$ where$k$is an integer and$a_k$are arbitrary real numbers. Now I want to use Mathemtica to calculate $$\sum_{k=1}^p ... 1answer 142 views ### Solve returns format I don't understand with dollar sign () [closed] I have the following function ... 2answers 462 views ### How to add lines in TableForm ... 2answers 470 views ### Plotting boundary of piecewise function in ContourPlot I am trying to do a ContourPlot of the following function:$$\psi=\begin{cases}\left(\sqrt{x^{2}+y^{2}}-\frac{0.25^{2}}{\sqrt{x^{2}+y^{2}}}\right)\frac{y}{\sqrt{x^{... 2answers 245 views ### How to plot this region? Consider the$2\times 2matrices \begin{align} A=\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} \end{align} and \begin{align} B=\begin{bmatrix} b_{11} & b_{12} \\ b_{... 1answer 175 views ### Ruth-Aaron quadruple challenge This a computational challenge, to find an efficient algorithm to discover a quadruple(n,n+1,n+2,n+3)$with the same sum of prime factors as described in the MO question, "Ruth-Aaron triples, etc." ... 1answer 134 views ### Write 7. as 7.0 and .7 as 0.7 [closed] i would like to know how to do in order to transform using a function .7 in 0.7 and 7 in 7.0. I need that the values in the list will really change because i must print them in a text file. Thank you.... 2answers 701 views ### NDSolve with Explicit, Implicit Euler and Trapezoidal method I am using Mathematica 9.0 both on Linux and Windows and I would like to integrate the Van der Pol equation numerically using various techniques such as Explicit and Implicit Euler and Trapezoidal ... 1answer 658 views ### Moving polygon on path curve to create 3D shape How can I move some polygon list = {{0, 0}, {0, 15}, {7, 13}, {2, 13}, {2, 5}, {5, 5}, {5, 3}, {2,3}, {2, 0}}; Graphics[{Black, Polygon[list]}] so it follow some ... 1answer 280 views ### Max element of a list with a custom ordering function I need a function to find max element of a list according to some custom ordering function, assuming that the function implements a total order (elements being compared might not even be numbers). ... 1answer 225 views ### NSolve super slow for a parameter scan I am using NSolve to solve two equations for two variables while scanning through several values of angles. The strange thing is that when I manual enter a value for the angle and Nsolve the answer is ... 2answers 162 views ### How to center LegendLabel in BarLegend BarLegend leaves a white region at the other end of the legend (the "0 end"), which is best seen by plotting a frame around the legend: ... 8answers 605 views ### Find the minimum integer r such that$(10^r - 1)/37\$ is an integer

I know Element[(10^r - 1)/37, Integers] tests the condition. So what is the command that gives me the minimum integer value r ...
494 views

### Fast Trial Division

I'm going to write a custom Trial Division primality test. I know that PrimeQ will first try trial division and then switches to ...
459 views

### How to prevent instability blow up in NDSolve?

I have the following code to solve a PDE: ...
253 views

### Wavelet transform of data with sliders

I saw a beautiful application of wavelets applied to a randomly created data series of about 500 data points. It used the Haar wavelet and had two sliders. The first slider allowed the user to view a ...
406 views

### Generating a polynomial that's accurate to within an error of no more than 1/10^5

I'm currently stuck on a question for class that asks... "Find a polynomial p[x] that you can use to calculate 6 ArcTan[x] to ...
3k views

### Hilbert-Huang transform package

I am trying to learn Hilbert-Huang transform (HHT) and its applications (especially in ECG signal processing). There are several HHT packages (scripts) HHT for R and Matlab. Is there any known ...