{"id":1353,"date":"2016-09-02T20:17:18","date_gmt":"2016-09-02T17:17:18","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=1353"},"modified":"2016-12-19T12:19:28","modified_gmt":"2016-12-19T09:19:28","slug":"%d1%8e3-32","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=1353","title":{"rendered":"\u042e 3.32"},"content":{"rendered":"<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430:<\/strong><br \/>\n\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c [latex]x=2\\left(\\sin x-\\frac{\\sin 2x}{2}+\\frac{\\sin 3x}{3}-\\cdots+\\left(-1 \\right)^{n-1} \\frac{\\sin nx}{n}\\right), [\/latex] [latex]-\\pi &lt; x &lt; \\pi [\/latex]\n<p><strong>\u0422\u0435\u0441\u0442\u044b<\/strong><\/p>\n<table width=\"333\">\n<tbody>\n<tr>\n<td>n<\/td>\n<td>x<\/td>\n<td>\u0421\u0443\u043c\u043c\u0430<\/td>\n<td>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>1<\/td>\n<td>0.867725<\/td>\n<td>\u041f\u0440\u043e\u0439\u0434\u0435\u043d<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>2<\/td>\n<td>2.575397<\/td>\n<td>\u041f\u0440\u043e\u0439\u0434\u0435\u043d<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>5<\/td>\n<td>-1.917849<\/td>\n<td>\u041f\u0440\u043e\u0439\u0434\u0435\u043d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h3>\n<pre class=\"lang:java decode:true \">\/* package whatever; \/\/ don't place package name! *\/\r\n\r\nimport java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\r\n\r\n\/* Name of the class has to be \"Main\" only if the class is public. *\/\r\nclass Ideone\r\n{\r\n\tpublic static void main (String[] args) throws java.lang.Exception\r\n\t{\r\n\t\tScanner sc = new Scanner(System.in); \r\n\t\tint n;\r\n\t\tdouble x;\r\n\t\tn = sc.nextInt();\r\n\t\tx = sc.nextInt();\t       \r\n\t\tdouble result=0;\r\n\t\tint j = 1;\r\n\t\tfor(int i = n; i &gt; 0; i--){\r\n\t\t\tresult += j * Math.sin(i * x) \/ i;\r\n\t\t\tj *= -1;\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}\r\n}<\/pre>\n<p><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<p><strong>\u0417\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434 \u0441\u0443\u043c\u043c\u044b:      <\/strong>[latex]2\\sum_{i=1}^{n}{\\left(-1 \\right)^{n-1}}\\frac{\\sin ix}{i}[\/latex]\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0446\u0438\u043a\u043b. \u041f\u0435\u0440\u0435\u0434 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u0442\u043e\u044f\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438. \u0427\u0442\u043e \u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0437\u043d\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u043c \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440.<\/p>\n<p><a href=\"http:\/\/ideone.com\/FapSCS\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 ideone<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430: \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c [latex]x=2\\left(\\sin x-\\frac{\\sin 2x}{2}+\\frac{\\sin 3x}{3}-\\cdots+\\left(-1 \\right)^{n-1} \\frac{\\sin nx}{n}\\right), [\/latex] [latex]-\\pi &lt; x &lt; \\pi [\/latex] \u0422\u0435\u0441\u0442\u044b n x \u0421\u0443\u043c\u043c\u0430 \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 3 1 0.867725 \u041f\u0440\u043e\u0439\u0434\u0435\u043d 2 2 2.575397 \u041f\u0440\u043e\u0439\u0434\u0435\u043d 1 5 -1.917849 \u041f\u0440\u043e\u0439\u0434\u0435\u043d \u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \/* package whatever; \/\/ don&#8217;t place package name! *\/ import java.util.*; import java.lang.*; import java.io.*; \/* Name of the class &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=1353\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":90,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1353"}],"collection":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1353"}],"version-history":[{"count":59,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1353\/revisions"}],"predecessor-version":[{"id":1786,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1353\/revisions\/1786"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}