{"id":1423,"date":"2021-10-03T23:23:03","date_gmt":"2021-10-03T14:23:03","guid":{"rendered":"http:\/\/www.miyamoto-lab.com\/?page_id=1423"},"modified":"2021-10-04T12:27:14","modified_gmt":"2021-10-04T03:27:14","slug":"hgjah4787dfha","status":"publish","type":"page","link":"https:\/\/www.miyamoto-lab.com\/ja\/hgjah4787dfha\/","title":{"rendered":"3. 3\u7ae0\u306e\u7b54\u3048\u30fb3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\uff08\u4ee5\u4e0b\u3067\u306f\u3001\u958b\u767a\u74b0\u5883\u304c\u624b\u5143\u306b\u306a\u3044\u5834\u5408\u306f\u3001<a href=\"https:\/\/www.codechef.com\/ide\">codechef.com<\/a>\u3084<a href=\"https:\/\/ideone.com\/\">ideone.com<\/a>\u3001<a href=\"https:\/\/paiza.io\/\">paiza.io<\/a>\u306a\u3069\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u826f\u3044\u3002\uff09<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-c\" data-lang=\"C\"><code>#include &lt;stdio.h&gt;\n#include &lt;math.h&gt;\n#define N 10\n#define h 1.0\ndouble f(double t,double x, double y);\ndouble g(double t,double x, double y);\nint main(void) {\n  int i;\n  double x=1000.0;\n  double y=100.0;\n  double t=0.0;\n  double kx1,ky1,kx2,ky2,kx3,ky3,kx4,ky4;\n  for (i = 0; i &lt; N; i++) {\n    kx1=h*f(t,x,y);ky1=h*g(t,x,y);\n    kx2=h*f(t+0.5*h,x+kx1*0.5,y+ky1*0.5);ky2=h*g(t+0.5*h,x+kx1*0.5,y+ky1*0.5);\n    kx3=h*f(t+0.5*h,x+kx2*0.5,y+ky2*0.5);ky3=h*g(t+0.5*h,x+kx2*0.5,y+ky2*0.5);\n    kx4=h*f(t+h,x+kx3,y+ky3);ky4=h*g(t+h,x+kx3,y+ky3);\n    x=x+(kx1+2.0*kx2+2.0*kx3+kx4)\/6.0;\n    y=y+(ky1+2.0*ky2+2.0*ky3+ky4)\/6.0;\n    t=t+h;\n    printf(&quot;%4.4lf\\t %4.4lf\\t %e\\n&quot;,x,y,t);\n    }\n}\ndouble f(double t,double x, double y) {\n  return (0.01*x-0.00001*x*y);\n}\ndouble g(double t,double x, double y) {\n  return (-0.02*y+0.00001*x*y);\n}\n\n<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u306e\u3088\u3046\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff08\u4ee5\u4e0b\u3067\u306f\u3001\u958b\u767a\u74b0\u5883\u304c\u624b\u5143\u306b\u306a\u3044\u5834\u5408\u306f\u3001codechef.com\u3084ideone.com\u3001paiza.io\u306a\u3069\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u826f\u3044\u3002\uff09 \u306e\u3088\u3046\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_locale":"ja","_original_post":"http:\/\/www.miyamoto-lab.com\/?page_id=1423","footnotes":""},"class_list":["post-1423","page","type-page","status-publish","hentry","ja"],"_links":{"self":[{"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/pages\/1423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/comments?post=1423"}],"version-history":[{"count":4,"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/pages\/1423\/revisions"}],"predecessor-version":[{"id":1447,"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/pages\/1423\/revisions\/1447"}],"wp:attachment":[{"href":"https:\/\/www.miyamoto-lab.com\/wp-json\/wp\/v2\/media?parent=1423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}