If you search some specific words like “Apple pie”, Google will show some different results at the first several lines, like this:

You can find out these results contain some extra contents, like rating, votes, time, and cal, Google must know these results are recipes. But how can they know? Using some deep learning algorithm? No, this is all about structured data.

Google support a lot of structured data.

1. Format is Microdata
2. Google support a lot type of structured data of enhancements, like Breadcrumbs, Corporate Contacts, Galleries and Lists, Logos, Sitelinks Searchbox, Site Name, Social Profile Links, and a lot of content types, Articles, Books, Courses, Datasets, Events, Fact Check, Local Businesses, Music, Podcasts, Products, Recipes, Reviews, TV and Movies, Videos. you can find details at Search Gallery.
3. Want to know how to use it, you can see Introduction to Structured Data.

[TIL] Integration by parts

Integration by parts or partial integration is a theorem to help us solve complex Integration problem of a product of functions. If a function can represent as a product of a function $$u(x)$$ and a derivative of a function $$u′(x)$$ , we can use integration by parts.

If $$u = u(x)$$ and $$du = u′(x) dx$$, while $$v = v(x)$$ and $$dv = v′(x) dx$$, then integration by parts states that:

$$\int_a^b u(x) v'(x) \, dx\ = [u(x) v(x)]_a^b-\int_a^b v(x) u'(x) \, dx$$.

or more compactly:

$$\int u\,dv=uv-\int v\,du$$.

This method is very useful when sometimes integration of $$v(x)u′(x)$$ is easier to find.

[TIL] Rationalizing Substitution

Rationalizing Substitution is a special type of U-Substitution, radicals in function often cause problems when integrating, use rationalizing substitution we can transform the problem to help us solve them.

For example, sometimes our function contain something like $$\sqrt{x}$$, in order to eliminate the “square root”, we can make substitution $$x = z^2$$，$$dx = 2z dz$$. Then you may can solve function’s integration easier.

U-Substitution

Today I learned U-Substitution, it is a method for finding integrals in calculus, also known as integration by substitution. Using the fundamental theorem of calculus often requires finding an antiderivative. For this and other reasons, U-Substitution is an important tool in mathematics. It is the counterpart to the chain rule of differentiation.

If you find difficult to finding an antiderivative directly, sometimes you may want use substitution $$u = ϕ(x)$$, rewrite $$f(x)dx$$ form to some function $$g(u)du$$ form and get antiderivative of $$g(u)du$$ first, and put $$x$$ in the antiderivative to get what you want at first.

For example, consider the integral

$$\int _{0}^{2}x\cos(x^{2}+1)\,dx$$

If we apply the formula from right to left and make the substitution $$u = ϕ(x) = (x2 + 1)$$, we obtain $$du = 2x dx$$ and hence; $$x dx = ½du$$

{\begin{aligned}\int _{x=0}^{x=2}x\cos(x^{2}+1)\,dx&{}={\frac {1}{2}}\int _{u=1}^{u=5}\cos(u)\,du {}={\frac {1}{2}}(\sin(5)-\sin(1)).\end{aligned}}