ucahgpa
(Georgios Pasias)
October 26, 2017, 9:44am
1
I am trying to find the analytical solution of the following 3rd order non-linear differential equation in Mathematica but I get the error message:
DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.
Differential equation: a*(f’(x))^2+f’‘’(x)=0 with initial and boundary conditions f(0)=0, f’(0)=0, f(1)=1, f’'(1)=1
This how I input it in Mathematica and the output. Please any suggestions how to make it work.
In[1]: DSolve[{a (f'[x])^2+f'''[x]==0, f[0]=0, f'[0]==0,f[1]=1,f''[1]=0},f[x],x]
… DSolve: For some branches of the general solution, unable to solve for the conditions
Out[1]={}
fkampas
(Frank Kampas)
October 26, 2017, 7:15pm
2
I suggest you try solving it without the initial and boundary conditions and then apply them to the solution you get.
mroge02
(Michael Rogers)
October 27, 2017, 12:26am
3
You have four conditions and three degrees of freedom. There may not be a solution.
fkampas
(Frank Kampas)
October 28, 2017, 1:06pm
4
In[10]:= DSolve[a f’ ^2 + f’‘’ == 0, f , x]
Out[10]= {{f[x] ->
C[3] - (6^(2/3)
WeierstrassZeta[((-a)^(1/3) (x + C[1]))/6^(
1/3), {0, C[2]}])/(-a)^(2/3)}}
ucahgpa
(Georgios Pasias)
October 28, 2017, 1:54pm
5
Thank you for your answer. I need to find the constants a,C[1],C[2],C[3] though, otherwise I cant use the solution.
I will input the solution in matlab and find f(x) from zero to one. I did it numerically but I need to find the exact solution for more accuracy.
Any suggestions of how to find the constants will be appreciated.
Thank you again for your help.
fkampas
(Frank Kampas)
October 28, 2017, 1:59pm
6
You have four boundary conditions but, as Michael Rogers said, there are only 3 constants of integration. I suggest that you try DSolve with only 3 boundary conditions.
ucahgpa
(Georgios Pasias)
October 28, 2017, 2:06pm
7
Ok, I will try that, thank you
mroge02
(Michael Rogers)
October 28, 2017, 5:06pm
8
Can you say what the constants from the numerical solution are approximately?
…
OK, I found some right away using RandomComplex with FindRoot:
{a -> 56.22778029126074` + 3.740551142700798`*^-14 I,
c[1] -> -0.7096774193548387` - 0.11174521339154064` I,
c[2] -> -95.41801151976168` + 129.84673071733812` I,
c[3] -> 0.7096774193548386` - 0.11174521339154053` I}
Assuming these are close to what you want (there may be many solutions), then the following can be used to increase their precision:
{dsol} = DSolve[a f'[x]^2 + f'''[x] == 0, f, x, GeneratedParameters -> c];
bcsys = {f[0] == 0, f'[0] == 0, f[1] == 1, f''[1] == 0} /. dsol; (* BC system *)
vars = {a, c[1], c[2], c[3]};
init = {a -> 56.22778029126074` + 3.740551142700798`*^-14 I,
c[1] -> -0.7096774193548387` - 0.11174521339154064` I,
c[2] -> -95.41801151976168` + 129.84673071733812` I,
c[3] -> 0.7096774193548386` - 0.11174521339154053` I};
prec = 32; (* desired precision *)
nparam = FindRoot[bcsys, Thread@{vars, vars /. init}, WorkingPrecision -> prec]
bcsys /. Equal -> Subtract /. nparam // Abs
(*
new roots:
{a -> 56.227780291260753368416425986923 -
1.6078204829418050036920493892578*10^-29 I,
c[1] -> -0.70967741935483870967741935483880 -
0.11174521339154047055015782848423 I,
c[2] -> -95.418011519761677541078344370704 +
129.84673071733781256688742233049 I,
c[3] -> 0.70967741935483870967741935483878 -
0.11174521339154047055015782848427 I}
residuals:
{0.*10^-29, 0.*10^-27, 0.*10^-29, 0.*10^-26}
*)
fkampas
(Frank Kampas)
October 29, 2017, 11:37pm
9
If you redefine your function, you might be able to move a into the third boundary condition
ucahgpa
(Georgios Pasias)
October 30, 2017, 3:15pm
10
Thank you for all the help so far. I tried the previous solution but I didn’t get the expected results so far.
What exactly do you mean by redefining the function?
fkampas
(Frank Kampas)
October 30, 2017, 5:12pm
11
I’m assuming that a is an adjustable parameter needed to fit all the boundary conditions. If you define a function g(x) such that a*f’[x]^2 is g’[x]^2, that should move a to the non-zero boundary condition.