Tag Info

Hot answers tagged

30

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 = ...


24

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 Here is one of the example apps from blog - go read it in full - fun! Don't miss the ...


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 ...


22

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.


18

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[#]] &, ...


15

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 ...


13

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]]


12

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 ...


11

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):


10

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 -> ...


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 ...


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

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 ...


8

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["CalculateUnits`UnitCommonSymbols`*"], "CalculateUnits`UnitCommonSymbols`" ~~ r_ :> r] and you get some kind of list ;-)


8

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 ...


8

Calling Wolfram|Alpha is not generally an efficient way to retrieve bulk data; where possible, it is better to use a built in data function. Part of the problem is figuring out what to submit to Wolfram|Alpha. In the code you supplied, the issue begins with Wolfram|Alpha returning Missing[NotAvailable]. WolframAlpha["AAPL ...


8

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 ...


8

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


8

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 -> ...


7

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 ...


6

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, ...


6

WolframAlpha["Sunrise june 25, 2013", {{"DaylightInformation", 1}, "ComputableData"}, PodStates -> {"DaylightInformation__More"}] gives {{"begin astronomical twilight", "3:56 am PDT"}, {"begin nautical twilight", "4:40 am PDT"}, {"begin civil twilight", "5:18 am PDT"}, {"sunrise", "5:49 am PDT"}, {"sunset", "8:33 pm PDT"}, {"end ...


6

In Mathematica 10, this tells you the number of calls remaining in your cloud account if you are logged in: CloudAccountData["WolframAlphaCallsAvailable"] 2168


6

data = WolframAlpha["median income in Maryland counties", {{"PropertyRanking:ACSData", 1}, "ComputableData"}]; data // TableForm


6

Ctrl+= gasoline heat of combustion * density results in: Quantity[32.7, "Kilojoules"/"Centimeters"^3] To get energy per gallon: UnitConvert[%, "Joules"/"Gallons"] (* Quantity[1.23782965*^8, "Joules"/"Gallons"] *)


6

As pointed out by Michael Seifert in a comment GeoGraphics[Polygon[Ctrl+=Italy]] should work (it worked for me), but if you want do it without using Wolfram's server, try GeoGraphics[Polygon[Entity["Country", "Italy"]], GeoBackground -> None]


6

As Guesswhoitis already suggested, this is a machine precision issue. So let us do your computation with arbitrary precision numbers. For doing so, all machine numbers have to be replaced with arbitrary precision numbers, otherwise the computation falls back to machine numbers. In the following command I have done this by placing `30 after each machine ...


5

This does not really answer the question as to why Mathematica's Integrate yields an apparently wrong answer. This simply states why the two answers are different. It seems Wolfram|Alpha does not attempt to do a symbolic integration (which is what your input asks for) before taking its numerical value. As I stated in my comment, using NIntegrate gives the ...


5

For indefinite integrals where "Show Steps" is available, the pod state is "IndefiniteIntegral__Step-by-step solution". The following works for cases where W|A can show the steps. showSteps[query_] := WolframAlpha[ "integrate " <> ToString[query], {{"IndefiniteIntegral", 2}, "Content"}, PodStates -> {"IndefiniteIntegral__Step-by-step ...


5

1) Tap twice = on a new line 2) After orange Spiky type: city in orange county, california 3) Press button MORE till you get al cities 4) Click little cross in the right top corner of the cities panel and choose from the sub-menu: Commutable Data This is what you get (it may look cumbersome but the point is you don't have to type it - the code is ...



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