{"id":845,"date":"2023-03-04T22:02:15","date_gmt":"2023-03-04T14:02:15","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=845"},"modified":"2023-03-04T22:17:44","modified_gmt":"2023-03-04T14:17:44","slug":"mathjax-basic-piecewise-function","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/04\/mathjax-basic-piecewise-function\/","title":{"rendered":"MathJax\u57fa\u7840\u4e4b\u5206\u6bb5\u51fd\u6570 piecewise functions"},"content":{"rendered":"<p>\u600e\u4e48\u5199\u5206\u6bb5\u51fd\u6570\u5462\uff1f\u7528\u5173\u952e\u8bcd <code>{case}<\/code>\u3002<\/p>\n<p>\u4e3b\u8981\u683c\u5f0f\u662f <code>\\begin{cases} ... \\end{cases}<\/code>\uff0c\u7528 <code>\\\\<\/code> \u6765\u6362\u884c\uff0c\u7528 <code>&amp;<\/code> \u6765\u5bf9\u9f50\u3002<\/p>\n<p><!-- more --><\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<pre><code>f(n) =\n\\begin{cases}\n  n\/2,  &amp; \\text{if $n$ is even} \\\\\n  3n+1, &amp; \\text{if $n$ is odd}\n\\end{cases}<\/code><\/pre>\n<p>\u53ef\u4ee5\u5f97\u5230\uff1a <\/p>\n<pre><code class=\"language-mathjax\">f(n) =\n\\begin{cases}\n  n\/2,  &amp; \\text{if $n$ is even} \\\\\n  3n+1, &amp; \\text{if $n$ is odd}\n\\end{cases}<\/code><\/pre>\n<p>\u5982\u679c\u60f3\u628a\u62ec\u53f7\u653e\u53f3\u8fb9\uff0c\u5c31\u8fd9\u6837\u5199\uff1a<\/p>\n<pre><code>\\left.\n  \\begin{array} {l}\n    \\text{if n is even:} &amp; n\/2 \\\\\n    \\text{if n is odd:} &amp; 3n+1\n  \\end{array}\n\\right\\}\n=f(n)<\/code><\/pre>\n<p>\u5f97\u5230\uff1a <\/p>\n<pre><code class=\"language-mathjax\">\\left.\n  \\begin{array} {l}\n    \\text{if n is even:} &amp; n\/2 \\\\\n    \\text{if n is odd:} &amp; 3n+1\n  \\end{array}\n\\right\\}\n=f(n)<\/code><\/pre>\n<p>\u5982\u679c\u60f3\u8ba9\u4e24\u884c\u4e4b\u95f4\u7684\u95f4\u9694\u53d8\u5f97\u66f4\u5927\u4e00\u4e9b\uff0c\u5c31\u53ef\u4ee5\u7528 <code>\\\\[2ex]<\/code> \u4ee3\u66ff <code>\\\\<\/code>\uff0c\u63a5\u7740\u4e3e\u4f8b\u5b50\uff1a<\/p>\n<pre><code>f(n) =\n\\begin{cases}\n  \\frac{n}{2}, &amp; \\text{if $n$ is even} \\\\[2ex]\n  3n+1, &amp; \\text{if $n$ is odd}\n\\end{cases}<\/code><\/pre>\n<p>\u5f97\u5230\uff1a<\/p>\n<pre><code class=\"language-mathjax\">f(n) =\n\\begin{cases}\n  \\frac{n}{2},  &amp; \\text{if $n$ is even} \\\\[2ex]\n  3n+1, &amp; \\text{if $n$ is odd}\n\\end{cases}<\/code><\/pre>\n<blockquote>\n<p>\u6ce8\uff1a<code>ex<\/code>\u662f\u6307\u5b57\u6bcdx\u7684\u9ad8\u5ea6\uff0c<code>\\\\[2ex]<\/code>\u5c31\u8868\u793a\u4e24\u500d\u7684\u5b57\u6bcdx\u7684\u9ad8\u5ea6\u3002<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u600e\u4e48\u5199\u5206\u6bb5\u51fd\u6570\u5462\uff1f\u7528\u5173\u952e\u8bcd {case}\u3002 \u4e3b\u8981\u683c\u5f0f\u662f \\begin{cases} &#8230; \\end{case [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97],"tags":[241,240],"class_list":["post-845","post","type-post","status-publish","format-standard","hentry","category-tools-skills","tag-latex","tag-mathjax"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=845"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/845\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}