How to solve this equation which contains the complementary error function?

조회 수: 13 (최근 30일)
% clear all;clc
format long;
syms G d t h a N positive;
G=((1-2*d*t/h^2)*exp(d*t/h^2)*erfc(sqrt(d*t/h^2))+2*sqrt(t*d/(pi*h^2)))/(1+4*d*t/a^2);
Gd=diff(G,d,1);
Gdtao=diff(Gd,t,1);
tGdtao=solve(Gdtao,t);
The code is showed above and its run result is "Warning: Explicit solution could not be found. > In solve at 169" The vesion of Matlab is R2012b.
The following is the equation:
(4*(erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2)*((2*d*t)/h^2 - 1) - (2*d^(1/2)*t^(1/2))/(pi^(1/2)*h)))/(a^2*((4*d*t)/a^2 + 1)^2) - ((2*erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2))/h^2 + (erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2)*((2*d*t)/h^2 - 1))/h^2 - 1/(2*pi^(1/2)*d^(1/2)*h*t^(1/2)) - (4*d^(1/2)*t^(1/2))/(pi^(1/2)*h^3) + (4*d*t*erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2))/h^4 - ((2*d*t)/h^2 - 1)/(2*pi^(1/2)*d^(1/2)*h*t^(1/2)) - (d^(1/2)*t^(1/2)*((2*d*t)/h^2 - 1))/(pi^(1/2)*h^3) + (d*t*erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2)*((2*d*t)/h^2 - 1))/h^4)/((4*d*t)/a^2 + 1) + (4*t*((2*d*erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2))/h^2 - d^(1/2)/(pi^(1/2)*h*t^(1/2)) + (d*erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2)*((2*d*t)/h^2 - 1))/h^2 - (d^(1/2)*((2*d*t)/h^2 - 1))/(pi^(1/2)*h*t^(1/2))))/(a^2*((4*d*t)/a^2 + 1)^2) + (4*d*((2*t*erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2))/h^2 - t^(1/2)/(pi^(1/2)*d^(1/2)*h) + (t*erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2)*((2*d*t)/h^2 - 1))/h^2 - (t^(1/2)*((2*d*t)/h^2 - 1))/(pi^(1/2)*d^(1/2)*h)))/(a^2*((4*d*t)/a^2 + 1)^2) - (32*d*t*(erfc((d^(1/2)*t^(1/2))/h)*exp((d*t)/h^2)*((2*d*t)/h^2 - 1) - (2*d^(1/2)*t^(1/2))/(pi^(1/2)*h)))/(a^4*((4*d*t)/a^2 + 1)^3)=0
I also tried to solve it by Maple 16 and failed, too. Looking forward to any kind help. Thanks!

채택된 답변

Roger Stafford
Roger Stafford 2013년 8월 19일
As Walter has pointed out, it is surely not possible for 'solve' to find an explicit solution for t in terms of the other variables, since your expression involves the 'erfc' function. The best you can hope for is a numerical solution. To accomplish this I would suggest you make the following substitutions in G to simplify matters. Let x = sqrt(d*t)/h and k = 4*h^2/a^2 so that
G = g(x) = ((1-2*x^2)*exp(x^2)*erfc(x)+2*x/sqrt(pi))/(1+k*x^2)
Then
dG/dd = dg/dx*dx/dd = g'(x)*sqrt(t/d)/(2*h)
and
d(dG/dd)/dt = g"(x)*dx/dt*sqrt(t/d)/(2*h)+g'(x)/sqrt(d*t)/(4*h)
= g"(x)*(sqrt(d/t)/(2*h))*sqrt(t/d)/(2*h)+g'(x)/sqrt(d*t)/(4*h)
= g"(x)/(4*h^2)+g'(x)/(4*h^2)/x
= (g"(x)*x+g'(x))/(4*h^2*x)
Hence the equation you want to solve is
g"(x)*x+g'(x) = 0
For this purpose you can use matlab's 'fzero'. For any given value of k=4*h^2/a^2 you can find the x root or roots of this equation. Having found it or them, you can immediately use the solution(s) to solve for t as
t = h^2*x^2/d
You can use your symbolic toolbox to evaluate and simplify g'(x) and g"(x) in setting up the expression g"(x)*x+g'(x) for 'fzero' to solve.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 8월 18일
I don't think there is any analytic closed-form solution.
When I experiment with some [a, d, h] values, I get quite different curve shapes depending on what I choose.
even just solving p = erfc(q) for q does not appear to have a closed form solution.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by