{"id":704,"date":"2013-06-10T09:16:24","date_gmt":"2013-06-10T14:16:24","guid":{"rendered":"https:\/\/blogs.mathworks.com\/loren\/?p=704"},"modified":"2017-01-06T11:13:51","modified_gmt":"2017-01-06T16:13:51","slug":"from-symbolic-differential-equations-to-their-numeric-solution","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/loren\/2013\/06\/10\/from-symbolic-differential-equations-to-their-numeric-solution\/","title":{"rendered":"From Symbolic Differential Equations to Their Numeric Solution"},"content":{"rendered":"<div class=\"content\"><!--introduction--><p>Once more, I am pleased to introduce guest blogger Kai Gehrs. Kai has been a Software Engineer at MathWorks for the past five years mainly working on features for the <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\">Symbolic Math Toolbox<\/a>. He has a background in mathematics and computer science and already contributed to my blog in the past.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#49aefc25-b542-4261-b085-85c7e6c19ec4\">In a Nutshell: What Is This Article About?<\/a><\/li><li><a href=\"#12eed599-056f-4291-a9cc-4ba7f9a03c3f\">Defining a Differential Equation in Symbolic Form<\/a><\/li><li><a href=\"#9ee15bce-87b2-4719-8473-95374cf15dc9\">From Scalar ODE to Coupled First-Order System<\/a><\/li><li><a href=\"#7f81baed-cf96-416f-bfd4-15926c98735e\">From Coupled First-Order System to Function Handle Representation<\/a><\/li><li><a href=\"#e6e9eb80-9bc0-4cf7-9e3a-a396fc41bb42\">From Function Handle Representation to Numeric Solution<\/a><\/li><li><a href=\"#a1a41aee-1694-4025-85ac-d2b2dff0b486\">Have You Tried This Worklfow?<\/a><\/li><\/ul><\/div><h4>In a Nutshell: What Is This Article About?<a name=\"49aefc25-b542-4261-b085-85c7e6c19ec4\"><\/a><\/h4><p>In the article <a href=\"https:\/\/blogs.mathworks.com\/loren\/2010\/04\/08\/odes-from-symbolic-to-numeric-code\">ODEs, from Symbolic to Numeric Code<\/a>, Loren demonstrated how you can<\/p><div><ul><li>Compute a symbolic solution of an ordinary differential equation (ODE) using <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/dsolve.html\"><tt>dsolve<\/tt><\/a><\/li><li>Convert the symbolic solution to a MATLAB function handle using <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/matlabfunction.html\"><tt>matlabFunction<\/tt><\/a><\/li><li>Plot the solution using MATLAB's <tt>plot<\/tt>.<\/li><\/ul><\/div><p>In this article, we consider a slightly different scenario. Suppose that we have defined an ODE. First, we try to solve it symbolically. But we find that the symbolic ODE solver cannot find a closed form solution (something which is likely to happen, because only particular classes of ODEs can be solved in closed symbolic form).<\/p><p>Since we cannot solve the ODE symbolically, we must switch to a numeric ODE solver. But numeric solvers require a particular form and type of arguments, which often differ from the arguments of a symbolic solver. Symbolic solvers require a scalar symbolic (= \"textbook-like\") representation of an ODE. Numeric solvers usually require them to be transformed to a coupled first-order system.<\/p><p>This article demonstrates the following workflow of transforming a symbolic representation of an ODE to a form accepted by the MATLAB numeric ODE solver <a href=\"https:\/\/www.mathworks.com\/help\/techdoc\/ref\/ode45.html\"><tt>ode45<\/tt><\/a>.<\/p><div><ul><li>Define an ODE in a symbolic form using <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/symfun.html\">symbolic functions<\/a><\/li><li>Convert it to a coupled first-order system using <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/odetovectorfield.html\"><tt>odeToVectorField<\/tt><\/a><\/li><li>Create a function handle for the coupled first-order system using <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/matlabfunction.html\"><tt>matlabFunction<\/tt><\/a><\/li><li>Solve the differential equation numerically using the MATLAB numeric ODE solver <a href=\"https:\/\/www.mathworks.com\/help\/techdoc\/ref\/ode45.html\"><tt>ode45<\/tt><\/a><\/li><li>Plot the solution using <a href=\"https:\/\/www.mathworks.com\/help\/techdoc\/ref\/plot.html\"><tt>plot<\/tt><\/a>.<\/li><\/ul><\/div><h4>Defining a Differential Equation in Symbolic Form<a name=\"12eed599-056f-4291-a9cc-4ba7f9a03c3f\"><\/a><\/h4><p>We start with the second-order non-linear ODE with two given initial values:<\/p><p>$$y'' = (y - y^2) \\cdot y' - y, \\qquad y = y(t), \\qquad y(0) = 2, \\qquad y'(0) = 0.$$<\/p><p>We define it in a symbolic form using a symbolic function <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/symfun.html\">symfun<\/a> <tt>y(t)<\/tt>:<\/p><pre class=\"codeinput\">syms <span class=\"string\">y(t)<\/span>;\r\node = diff(y,2) == (y-y^2)*diff(y) - y;\r\n<\/pre><p>When trying to compute a solution of this ODE using <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/dsolve.html\"><tt>dsolve<\/tt><\/a>, we see that the symbolic ODE solver does not find an explicit closed form solution:<\/p><pre class=\"codeinput\">dsolve(ode)\r\n<\/pre><pre class=\"codeoutput\">Warning: Explicit solution could not be found. \r\nans =\r\n[ empty sym ]\r\n<\/pre><p>Adding the initial values does not help:<\/p><pre class=\"codeinput\">Dy = diff(y); dsolve(ode,y(0) == 2,Dy(0) == 0)\r\n<\/pre><pre class=\"codeoutput\">Warning: Explicit solution could not be found. \r\nans =\r\n[ empty sym ]\r\n<\/pre><p>So we must use a numeric ODE solver to be able to plot the solution. But before we can convert the symbolic form of the ODE to a function handle accepted by <tt>ode45<\/tt>, we must convert the scalar form of the ODE to a coupled first-order ODE system.<\/p><h4>From Scalar ODE to Coupled First-Order System<a name=\"9ee15bce-87b2-4719-8473-95374cf15dc9\"><\/a><\/h4><p>The Symbolic Math Toolbox function <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/odetovectorfield.html\"><tt>odeToVectorField<\/tt><\/a> converts a scalar ODE to a first-order ODE system:<\/p><pre class=\"codeinput\">V = odeToVectorField(ode)\r\n<\/pre><pre class=\"codeoutput\">V =\r\n                          Y[2]\r\n - (Y[1]^2 - Y[1])*Y[2] - Y[1]\r\n<\/pre><p>For details about the algorithm used to convert a general n-th order scalar ODE to a first-order coupled ODE system, see the <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/odetovectorfield.html\"><tt>odeToVectorField<\/tt><\/a> documentation page.<\/p><p>The next step is to convert the system representation <tt>V<\/tt> of the ODE to a function handle accepted by <tt>ode45<\/tt>.<\/p><h4>From Coupled First-Order System to Function Handle Representation<a name=\"7f81baed-cf96-416f-bfd4-15926c98735e\"><\/a><\/h4><p>To convert the expression <tt>V<\/tt> to a MATLAB function handle we use <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/matlabfunction.html\"><tt>matlabFunction<\/tt><\/a>:<\/p><pre class=\"codeinput\">F = matlabFunction(V,<span class=\"string\">'vars'<\/span>,{<span class=\"string\">'t'<\/span>,<span class=\"string\">'Y'<\/span>})\r\n<\/pre><pre class=\"codeoutput\">F = \r\n    @(t,Y)[Y(2);-(Y(1).^2-Y(1)).*Y(2)-Y(1)]\r\n<\/pre><p>We are almost done. We only need to call the numeric ODE solver <tt>ode45<\/tt> for the function handle <tt>F<\/tt>, and then plot the result.<\/p><h4>From Function Handle Representation to Numeric Solution<a name=\"e6e9eb80-9bc0-4cf7-9e3a-a396fc41bb42\"><\/a><\/h4><p>Now we solve the differential equation converted to the function handle <tt>F<\/tt>:<\/p><pre class=\"codeinput\">sol = ode45(F,[0 10],[2 0]);\r\n<\/pre><p>Here, <tt>[0 10]<\/tt> lets us compute the numerical solution on the interval from <tt>0<\/tt> to <tt>10<\/tt>. Another additional parameter, <tt>[2 0]<\/tt>, corresponds to the initial values: $y(0) = 2$ and $y'(0) = 0$.<\/p><p>Before plotting the solution, we use <a href=\"https:\/\/www.mathworks.com\/help\/techdoc\/ref\/linspace.html\"><tt>linspace<\/tt><\/a> to create 100 points in the interval <tt>[0,10]<\/tt> and <a href=\"https:\/\/www.mathworks.com\/help\/techdoc\/ref\/deval.html\"><tt>deval<\/tt><\/a> to evaluate the solution at each of these points:<\/p><pre class=\"codeinput\">x = linspace(0,10,100);\r\ny = deval(sol,x,1);\r\n<\/pre><p>Now we plot the solution:<\/p><pre class=\"codeinput\">plot(x,y)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/2013\/SymbolicNumericWorkflow_01.png\" alt=\"\"> <h4>Have You Tried This Worklfow?<a name=\"a1a41aee-1694-4025-85ac-d2b2dff0b486\"><\/a><\/h4><p>Have you tried using <tt>odeToVectorField<\/tt> and <tt>matlabFunction<\/tt> or creating symbolic functions with <tt>symfun<\/tt>? Let me know <a href=\"https:\/\/blogs.mathworks.com\/loren\/?p=704#respond\">here<\/a>. If you find Kai's article interesting, take a look at his other posts on my blog:<\/p><div><ul><li><a href=\"https:\/\/blogs.mathworks.com\/loren\/2011\/10\/25\/simplifying-symbolic-results\">Simplifying Symbolic Results<\/a><\/li><li><a href=\"https:\/\/blogs.mathworks.com\/loren\/2012\/07\/27\/using-symbolic-equations-and-symbolic-functions-in-matlab\">Using Symbolic Equations And Symbolic Functions In MATLAB<\/a><\/li><li><a href=\"https:\/\/blogs.mathworks.com\/loren\/2013\/04\/26\/using-symbolic-math-toolbox-to-compute-area-moments-of-inertia\">Using Symbolic Math Toolbox to Compute Area Moments of Inertia<\/a><\/li><\/ul><\/div><script language=\"JavaScript\"> <!-- \r\n    function grabCode_adb4ece5748f4303a0ed27f3f906eedb() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='adb4ece5748f4303a0ed27f3f906eedb ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' adb4ece5748f4303a0ed27f3f906eedb';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2013 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_adb4ece5748f4303a0ed27f3f906eedb()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2013a<br><\/p><p class=\"footer\"><br>\r\n      Published with MATLAB&reg; R2013a<br><\/p><\/div><!--\r\nadb4ece5748f4303a0ed27f3f906eedb ##### SOURCE BEGIN #####\r\n%% From Symbolic Differential Equations to Their Numeric Solution \r\n% Once more, I am pleased to introduce guest blogger Kai Gehrs. Kai has\r\n% been a Software Engineer at MathWorks for the past five years mainly\r\n% working on features for the\r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic Symbolic Math Toolbox>.\r\n% He has a background in mathematics and computer science and already\r\n% contributed to my blog in the past.\r\n%  \r\n%% In a Nutshell: What Is This Article About?\r\n% In the article\r\n% <https:\/\/blogs.mathworks.com\/loren\/2010\/04\/08\/odes-from-symbolic-to-numeric-code\r\n% ODEs, from Symbolic to Numeric Code>, Loren demonstrated how you can\r\n%\r\n% * Compute a symbolic solution of an ordinary differential equation (ODE) \r\n% using <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/dsolve.html |dsolve|>\r\n% * Convert the symbolic solution to a MATLAB function handle using \r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/matlabfunction.html\r\n% |matlabFunction|>  \r\n% * Plot the solution using MATLAB's \r\n% <http:\/\/www.mathworks.de\/de\/help\/matlab\/ref\/plot.html |plot|>. \r\n%\r\n% In this article, we consider a slightly different scenario. Suppose that \r\n% we have defined an ODE. First, we try to solve it symbolically. But we \r\n% find that the symbolic ODE solver cannot find a closed form solution \r\n% (something which is likely to happen, because only particular classes of\r\n% ODEs can be solved in closed symbolic form). \r\n% \r\n% Since we cannot solve \r\n% the ODE symbolically, we must switch to a numeric ODE solver. But  \r\n% numeric solvers require a particular form and type of arguments, which\r\n% often differ from the arguments of a symbolic solver. Symbolic solvers \r\n% require a scalar symbolic (= \"textbook-like\") representation of an ODE. \r\n% Numeric solvers usually require them to be transformed to a coupled \r\n% first-order system. \r\n%\r\n% This article demonstrates the following workflow of transforming a symbolic\r\n% representation of an ODE to a form accepted by the MATLAB numeric ODE\r\n% solver <https:\/\/www.mathworks.com\/help\/techdoc\/ref\/ode45.html |ode45|>. \r\n%\r\n% * Define an ODE in a symbolic form using \r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/symfun.html symbolic functions> \r\n% * Convert it to a coupled first-order system using \r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/odetovectorfield.html |odeToVectorField|> \r\n% * Create a function handle for the coupled first-order system using \r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/matlabfunction.html |matlabFunction|> \r\n% * Solve the differential equation numerically using the MATLAB numeric\r\n% ODE solver <https:\/\/www.mathworks.com\/help\/techdoc\/ref\/ode45.html |ode45|>\r\n% * Plot the solution using <https:\/\/www.mathworks.com\/help\/techdoc\/ref\/plot.html |plot|>.\r\n%\r\n%% Defining a Differential Equation in Symbolic Form \r\n% We start with the second-order non-linear ODE with two given initial\r\n% values:\r\n% \r\n% $$y'' = (y - y^2) \\cdot y' - y, \\qquad y = y(t), \\qquad y(0) = 2, \\qquad y'(0) = 0.$$\r\n%\r\n% We define it in a symbolic form using a symbolic function \r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/symfun.html symfun> \r\n% |y(t)|:  \r\nsyms y(t);\r\node = diff(y,2) == (y-y^2)*diff(y) - y;\r\n%% \r\n% When trying to compute a solution of this ODE using\r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/dsolve.html |dsolve|>, we\r\n% see that the symbolic ODE solver does not find an explicit closed form\r\n% solution:\r\n% \r\ndsolve(ode)\r\n%% \r\n% Adding the initial values does not help:\r\nDy = diff(y); dsolve(ode,y(0) == 2,Dy(0) == 0)\r\n%%\r\n% So we must use a numeric ODE solver to be able to plot the solution. But\r\n% before we can convert the symbolic form of the ODE to a function handle\r\n% accepted by |ode45|, we must convert the scalar form of the ODE to a\r\n% coupled first-order ODE system.\r\n%% From Scalar ODE to Coupled First-Order System \r\n% The Symbolic Math Toolbox function\r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/odetovectorfield.html\r\n% |odeToVectorField|> converts a scalar ODE to a first-order ODE system:\r\n%\r\nV = odeToVectorField(ode)\r\n%%\r\n% For details about the algorithm used to convert a general n-th order\r\n% scalar ODE to a first-order coupled ODE system, see the\r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/odetovectorfield.html\r\n% |odeToVectorField|> documentation page.\r\n% \r\n% The next step is to convert the system representation |V| of the ODE\r\n% to a function handle accepted by |ode45|. \r\n%\r\n%% From Coupled First-Order System to Function Handle Representation \r\n% To convert the expression |V| to a MATLAB\r\n% <http:\/\/www.mathworks.de\/de\/help\/matlab\/ref\/function_handle.html function\r\n% handle> we use\r\n% <https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\/matlabfunction.html\r\n% |matlabFunction|>:\r\n%\r\nF = matlabFunction(V,'vars',{'t','Y'})\r\n%%\r\n% We are almost done. We only need to call the numeric ODE solver |ode45|\r\n% for the function handle |F|, and then plot the result.\r\n%% From Function Handle Representation to Numeric Solution\r\n% Now we solve the differential equation converted to the function handle\r\n% |F|:\r\n%\r\nsol = ode45(F,[0 10],[2 0]);\r\n%%\r\n% Here, |[0 10]| lets us compute the numerical solution on the interval\r\n% from |0| to |10|. Another additional parameter, |[2 0]|, corresponds to\r\n% the initial values: $y(0) = 2$ and $y'(0) = 0$.\r\n%\r\n% Before plotting the solution, we use  \r\n% <https:\/\/www.mathworks.com\/help\/techdoc\/ref\/linspace.html |linspace|>  \r\n% to create 100 points in the interval |[0,10]| and \r\n% <https:\/\/www.mathworks.com\/help\/techdoc\/ref\/deval.html |deval|> \r\n% to evaluate the solution at each of these points:\r\n%\r\nx = linspace(0,10,100);\r\ny = deval(sol,x,1);\r\n%% \r\n% Now we plot the solution: \r\nplot(x,y)\r\n%% Have You Tried This Worklfow?\r\n% Have you tried using |odeToVectorField| and |matlabFunction| or creating\r\n% symbolic functions with |symfun|? Let me know\r\n% <https:\/\/blogs.mathworks.com\/loren\/?p=704#respond here>. If you find Kai's\r\n% article interesting, take a look at his other posts on my blog:\r\n%\r\n% * <https:\/\/blogs.mathworks.com\/loren\/2011\/10\/25\/simplifying-symbolic-results Simplifying Symbolic Results> \r\n% * <https:\/\/blogs.mathworks.com\/loren\/2012\/07\/27\/using-symbolic-equations-and-symbolic-functions-in-matlab Using Symbolic Equations And Symbolic Functions In MATLAB> \r\n% * <https:\/\/blogs.mathworks.com\/loren\/2013\/04\/26\/using-symbolic-math-toolbox-to-compute-area-moments-of-inertia Using Symbolic Math Toolbox to Compute Area Moments of Inertia>\r\n\r\n\r\n\r\n##### SOURCE END ##### adb4ece5748f4303a0ed27f3f906eedb\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/2013\/SymbolicNumericWorkflow_01.png\" onError=\"this.style.display ='none';\" \/><\/div><!--introduction--><p>Once more, I am pleased to introduce guest blogger Kai Gehrs. Kai has been a Software Engineer at MathWorks for the past five years mainly working on features for the <a href=\"https:\/\/www.mathworks.com\/help\/toolbox\/symbolic\">Symbolic Math Toolbox<\/a>. He has a background in mathematics and computer science and already contributed to my blog in the past.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/loren\/2013\/06\/10\/from-symbolic-differential-equations-to-their-numeric-solution\/\">read more >><\/a><\/p>","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[38],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/704"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/comments?post=704"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/704\/revisions"}],"predecessor-version":[{"id":2186,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/704\/revisions\/2186"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/media?parent=704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/categories?post=704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/tags?post=704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}