Thứ Bảy, 16 tháng 12, 2017

How to type Math formula in blog

We may use Matjax from https://www.mathjax.org
Adding the snippet to your page:
Theme => Edit HTML =>
<head>
  <script type="text/javascript" async
  src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
</head>

For example:
(1)
i=0xii!=limnni=1(1+aix)=xeydy=exi=0xii!=limnni=1(1+aix)=xeydy=ex
(2)
xNyN:y=x+1xNyN:y=x+1(3)
xR,yR:x+y=0yQ:y2=2xR,yR:x+y=0∄yQ:y2=2
(4)When a0a0, there are two solutions to ax2+bx+c=0ax2+bx+c=0 and they are x=b±b24ac2a.x=b±b24ac2a.Or you may love using Online LaTeX formula editor and browser-based math equation editor
http://hostmath.com/
Another source:How-do-you-use-LaTeX-mathematical-on-Quora?

Another example:
What is the solution of the differential equation 
(dydx)2+4ydydxtanx+4y2sec2x=cos6x+4y2(dydx)2+4ydydxtanx+4y2sec2x=cos6x+4y2

Let see how the problem will be solved by Yebraw Mada, studies Mathematics and Physics at University of Bristol (2021)
What a horrific looking equation. This may take some time to solve…
After a while of pondering I’ve realized that this is actually quite a lot simpler than it looks. We just need to rearrange the fuck out of it. Here goes:

We start with
(dydx)2+4ydydxtanx+4y2sec2x=cos6x+4y2(dydx)2+4ydydxtanx+4y2sec2x=cos6x+4y2
Let’s subtract the 4y24y2, giving us
(dydx)2+4ydydxtanx+4y2sec2x4y2=cos6x(dydx)2+4ydydxtanx+4y2sec2x4y2=cos6x
Now factorizing
(dydx)2+4ydydxtanx+4y2(sec2x1)=cos6x(dydx)2+4ydydxtanx+4y2(sec2x1)=cos6x
Now remembering our trig identities this becomes
(dydx)2+4ydydxtanx+4y2tan2x=cos6x(dydx)2+4ydydxtanx+4y2tan2x=cos6x
The next step is to multiply by cos2xcos2x
cos2x(dydx)2+4ydydxsinxcosx+4y2sin2x=cos8xcos2x(dydx)2+4ydydxsinxcosx+4y2sin2x=cos8x
It is not so obvious to spot the next step, but notice that the LHS factorizes perfectly.
(dydxcosx+2ysinx)2=(cos4x)2(dydxcosx+2ysinx)2=(cos4x)2
Note that here I will just focus on the positive square root of each side. The next method will apply for the negative values too.
dydxcosx+2ysinx=cos4xdydxcosx+2ysinx=cos4x
Dividing through by cosxcosx
dydx+2ytanx=cos3xdydx+2ytanx=cos3x
Now we solve using an integrating factor. Here it is
e2tanxdxe2tanxdx
e2lnsecxe2lnsecx
sec2xsec2x
Now multiplying by this integrating factor we get
dydxsec2x+2ysec2xtanx=sec2xcos3xdydxsec2x+2ysec2xtanx=sec2xcos3x
ddx(ysec2x)=cosxddx(ysec2x)=cosx
We eventually end up with
y=cos2x(sinx+C)y=cos2x(sinx+C)
Phew. That was tiring. This solution can then be checked by substituting it back into the original differential equation.
Thanks for the A2A!

Không có nhận xét nào:

Đăng nhận xét