# Tag Info

48

This shows a way to parametrise a line using the method suggested by Rahul Narain in a comment, i.e. using Fourier to approximate the data with a set of sinusoids. I use Rationalize to convert all the reals back to rationals, this isn't necessary but it makes the expression look more like those used in Wolfram Alpha. param[x_, m_, t_] := Module[{f, n = ...

40

This now has been discussed in Wolfram blog posts by Michael Trott: Part 1: Making Formulas… for Everything — From Pi to the Pink Panther to Sir Isaac Newton Part 2: Using Formulas... for Everything — From Complex Analysis Class to Political Cartoons to Music Album Covers Part 3: Even More Formulas… for Everything—From Filled Algebraic Curves to the Twitter ...

23

The idea The idea is that if we have $\log(a+b),\qquad a\gg b$ , then we can equivalently write this as $\log a + \log(1 + b/a)$ and the second part will be small, so that one can first compare the first part(s). The power towers with base numbers larger than 1 naturally lead to such logarithms when we repeatedly take the $\log$ of them. So, there ...

23

Perhaps this helps: The WolframAlpha function is limited to 1,000 API calls per day for professional Premier Service subscribers (500 API calls per day for student and classroom Premier Service subscribers), and 100 API calls per day for all other users, unless an API upgrade is purchased.

21

This was supposed to be a comment to Simon's answer, but it's gotten too long. Still, I wanted to share a somewhat cleaned-up version of Simon's Fourier-fitting function param[] (which I have renamed to FourierCurve[]): FourierCurve[x_, m_, t_, tol_: 0.01] := Module[{rat = Rationalize[#, tol] &, fc}, fc = Take[Chop[Fourier[x, FourierParameters -> {-...

21

apple = Interpreter["Company"]["Apple"]["Image"] Interpreter["Company"]["GE"]["Image"] Also works for the continent and respects colours: Interpreter["Company"]["Siemens"]["Image"] Update Interpreter["Company"]["Wolfram"]["Image"] For Apple addicts: ImageFilter[Max[Flatten[#]] - Min[Flatten[#]] &, ImagePad[Last@MapThread[ImageMultiply, {...

19

Artes' guess seems basically right. Here is a way to reach the correct result. First, the antiderivative returned by Mathematica: i0 = FullSimplify[ Integrate[Sqrt[(2 t)^2 + (4 - 3 t^2)^2], t], t > 0] (* (2 (Sqrt[16 - 2 I (-5 I + Sqrt[11]) t^2] Sqrt[8 + I (5 I + Sqrt[11]) t^2] ( 5 (-5 I + Sqrt[11]) EllipticE[ArcSin[1/2 t Root[9 - 5 #...

16

Another variation: SemanticInterpretation["AAPL Logo"] This method is nice because you can do at once: logos = SemanticInterpretation["AAPL, TSLA, GE and MSFT Logos"]; Column[logos, Frame -> All, FrameStyle -> Directive[Red, Thick]]

16

As the message shows, NSum works on limited recursions. Mathematica does not consider the "mathematical converge" when it works on NSum. Therefore Mathematica finds that this sum converges too slowly, and threw out the answer after MaxRecursion.

14

When a command has issues, it is a good idea to check the Possible Issues section of the doc page for the command, in this case NSum. Two of the issues apply to the OP's case: NSum may not detect divergence for some infinite sums Convergence verification is based on a ratio test that is inconclusive when equal to 1 [Edit notice: I made a mistake in ...

13

Use Interpreter without federal state or country. Works even for small german towns :) Interpreter["City"]["Memmingen"] GeoPosition[%] GeoGraphics[%] EDIT: Also you could ask for the airport: town = Interpreter["City"]["Memmingen"]; airport = Interpreter["Airport"]["Memmingen"]; GeoPosition[{town, airport}] or just use the nearest airport GeoNearest["...

13

Go to a new cell in a notebook and write "=", this will create an orange equality sign in the beginning of the cell. This means that you have entered the free form input mode. Write the name of a food item or a type of food and evaluate the cell, Mathematica will then return the entity corresponding to that food item or food type. You can hover the entity to ...

12

You could use the official ICAO abbreviation: Entity["Airport", "KLAX"] which makes sense because you will only be able to use officially named airports most of the time anyway. You can always get those (or the city details) via a W|A query and work your way from there (no googling involved): or like this (although it misses Van Nuys):

12

The date is different because Wolfram Alpha is wrong about when the Battle of Agincourt took place. Alpha is returning 25 October 1415 in the Gregorian calendar as the date of the battle, but the battle took place on that date in the Julian calendar (the calendar in use at the time). That date corresponds 3 November 1415 in the proleptic Gregorian ...

11

Here's something to get you started down to path of scraping the somewhat larger individual pictures from the Nobel website: links = Import[ "https://www.nobelprize.org/nobel_prizes/physics/laureates/index.html?images=yes", "Hyperlinks"]; individualpagelinks = Select[ links, StringMatchQ[ "https://www.nobelprize.org/nobel_prizes/physics/...

11

A bit too long for a comment... My best guess is that WolframAlpha["earth's gravity", "MathematicaResult"] is simply rounding to too few digits. It returns 32.2 ft/s^2, which seems pretty round for what it represents. Now maybe that's ok to do because gravity varies around the globe: data = GeogravityModelData[{{-90, -180.}, {90, 180.}}, "Magnitude", ...

10

Wolfram|Alpha is integrated in Mathematica. Integration based on function WolframAlpha. To learn basic interactive and programmatic usage see this question. In your case you can get formatted objects in Mathematica like: WolframAlpha["steam 135C", {{"PhaseDiagramTPPlot:ChemicalData", 1}, "Content"}, PodStates ->{"PhaseComputedThermodynamicProperties:...

10

For large enough bounds, NSum is used. Compare timings: NSum[(-1)^(n + 1)/n, {n, 1, 100000}] // AbsoluteTiming {0.004744, 0.693142 - 1.3494*10^-16 I} N[Sum[(-1)^(n + 1)/n, {n, 1, 100000}]] // AbsoluteTiming {1.84727, 0.693142}

10

Here's a workaround that directly queries the PDB search API and returns the first num search results as a Dataset[]. The routine is more complicated than I'd like, due to the finicky nature of the API (it only takes queries in XML format), as well as the somewhat clunky way XML is represented in Mathematica: pdbFindMoleculeName[name_String, num : (_Integer?...

9

I'm not sure whether this is what you seek, but you can use Trace to investigate in a call to Quantity. Then you extract the essence Quantity["Newtons"]; StringReplace[Names["CalculateUnitsUnitCommonSymbols*"], "CalculateUnitsUnitCommonSymbols" ~~ r_ :> r] and you get some kind of list ;-)

9

The bug is probably with Wolfram Alpha, not Mathematica, since the Mathematica query and the Wolfram Alpha website results are consistent. (Edit: Bug is fixed as of 2012-11-26, I got a kind notification from the W|A team in response to my earlier feedback) It looks like they swapped longitude with latitude for Upper Austria (it works with good ole Austria ...

9

You can set the options for WolframAlpha in the usual way. The option to change is: SetOptions[WolframAlpha, PodStates -> {"Show metric"}] as for me (for whatever reason) it was the default to show metric units, I could verify with: SetOptions[WolframAlpha, PodStates -> {"Show non-metric"}] that this seems indeed to affect also the answers to the ...

9

The problem seems to be that many companies, even some of the biggest, well known firms are not known in Entity["Company","name"] form to Mathematica. This holds for companies like Apple, Microsoft, General Electrics etc. I believe that CompanyData needs entities to be of this form. If you want to discover a company's entity representation using W|A ...

9

The following may be useful as starters: WolframAlpha["femme from french to german",{{"Translation:TranslationData", 1}, "ComputableData"}] (* {" Frau | Ehefrau", " Frau"} *)

9

QuantityMagnitude[WolframAlpha[#, {{"Result", 1}, "ComputableData"}]] & /@ {"Apple company revenue", "Apple company interest expense", "Apple company employees"} (* {1.828*10^11, 3.84*10^8, 97000} *) Update: Exchange rate conversion WolframAlpha[#, {{"Result", 1}, "ComputableData"}] & /@ {"Sony company revenue", "Sony company interest ...

9

Here's a start.... x = "healed"; y = "pay"; Intersection[ WolframAlpha["synonyms of " <> y, {{"Synonyms:WordData", 1}, "ComputableData"}, InputAssumptions -> {"*MC.%7E-_*WordData-"}], WolframAlpha["rhymes with " <> x, {{"Rhyme:WordData", 1}, "ComputableData"}, PodStates -> {"Rhyme:WordData__More"}, InputAssumptions -> {"*MC.%7E-_*...

9

I remember from last years conference (Wolfram Technology Conference 2015) that there was a presentation on food entities. It doesn't seem to have been recorded but you can get the presentation (Food in the Wolfram Language). It shows a great deal on how to access foods and gives details on some of their properties. The food data is somewhat deep and very ...

8

I'm using 8.0.4 and I get reasonable results (notice the constraint c>0) : nlm = NonlinearModelFit[data, {a + b Log[c x], c > 0}, {a, b, c}, x] ; nlm // Normal (* 0.0740508 - 0.00391526 Log[1.0714 x] *) FindFit[data, {a + b Log[c x], c > 0}, {a, b, c}, x] (* {a -> 0.0740508, b -> -0.00391526, c -> 1.0714} *) Show[Plot[nlm[x], {x, 10, ...

8

You can access historical GPD data via the WolframAlpha command like so: gdpData = WolframAlpha["us gdp", {{"History:GrossDomesticProduct:EconomicData",1},"ComputableData"}]; This returns quarterly data going back to 1947 in a structured list. You can manipulate the data just as you would any data in Mathematica. Thus, you can get the data points at ...

Only top voted, non community-wiki answers of a minimum length are eligible