0
$\begingroup$

I am sorry if this has been asked, I don't really know how to formulate the search to find it.

We have some system of equations (that are equal to zero), for example (not sure how to enter expression with partial derivatives so it can be copy-pasted):

expr={4 (-1 + 3 x^2) (-1 + y) T[x, y]^2 - 
  x (-1 + x^2) (-2 + y) T[x, y] D[T[x, y], x] + 
  x (-1 + x^2) (-1 + y) y D[T[x, y], y] D[T[x, y], x], 
 x (-1 + x^2) T[x, y] D[S[x, y], x] + 
  S[x, y] ((2 - 6 x^2) T[x, y] + x (-1 + x^2) D[T[x, y], x])};

enter image description here

where T[x,y], S[x,y] are some unknown funcitons. We want to solve the equations around y=0 in a series expansion, so we define

T[x_, y_] = Sum[tx[jj, x]*y^jj, {jj, 0, 7}];
S[x_, y_] = Sum[sx[jj, x]*y^jj, {jj, 0, 7}];

and then to first order we have

Simplify[Series[expr, {y, 0, 0}]]

enter image description here

We see that we can solve the first equation with no problem

DSolve[
 SeriesCoefficient[Simplify[Series[expr, {y, 0, 0}]], 0][[1]] == 
  0, {tx[0, x]}, x]

{{tx[0, x] -> x^2 (1 - x^2)^2 C[1]}}

But then when we plug that solution back in, it doesn't quite work

Simplify[Series[
   expr, {y, 0, 0}] /. {tx -> Function[x, x^2 (1 - x^2)^2 C1]}]

enter image description here

What am I doing wrong? My question is basically how to enter in Mathematica objects like $a_n(x)$ (and also $a_n(x,y)$ or even $a_{n,m}(x,y)$) where $n$, ($m$) is a non-negative Integer (a dummy index) and $x$, ($y$) is a variable (Real/Complex depending on the problem), so that we can manipulate them like any other function.

$\endgroup$
  • $\begingroup$ You can simply write DSolve[Normal@Series[expr, {y, 0, 0}] == {0, 0}, {tx[0, x], sx[0, x]}, x] and get {{sx[0, x] -> C[1], tx[0, x] -> x^2 (1 - x^2)^2 C[2]}}. $\endgroup$ – Alx Nov 29 '19 at 12:28
  • $\begingroup$ @Alx I know that. This is just a simple example to indicate my question. My real problem includes 5 equations with 5 unknown variables which are very long and there this approach doesn't work. $\endgroup$ – ThunderBiggi Nov 29 '19 at 13:02
  • $\begingroup$ Please, see my attempt to answer. $\endgroup$ – Alx Nov 29 '19 at 14:08
  • $\begingroup$ I don't fully understand your question but how about using tx -> Function[{x,y}, x^2 (1 - x^2)^2 C1] instead of tx -> Function[x, x^2 (1 - x^2)^2 C1]? $\endgroup$ – Hayashi Yoshiaki Dec 29 '19 at 16:48
  • 1
    $\begingroup$ @ThunderBiggi OK I got it. First you can try Subscript (Control key + _) to make tx and ty look more like a coefficient, then use Subscript[tx,0] -> Function[{x,y},x^2 (1-x^2) C1] . The reason of making the function of x and y even it is a function of only x is to convince Partial derivative function that its y derivative is 0. Another way to do similar thing is to use SetAttributes and Constant, but I don’t know whether it can make eg ‘a constant only respect to y’. Now I can’t use MA to test my suggestion. I hope you meet a good result. $\endgroup$ – Hayashi Yoshiaki Dec 31 '19 at 21:49
1
$\begingroup$

First you can try Subscript (Control key + _) to make tx and ty look more like a coefficient, then use Subscript[tx,0] -> Function[{x,y},x^2 (1-x^2) C1]. The reason for making the function of x and y even when it is a function only of x is to convince the partial derivative function that its y derivative is 0. Another way to do similar things is to use SetAttributes and Constant, but I don’t know whether it can make eg ‘constant only respect to y’.

$\endgroup$
0
$\begingroup$

Probably not complete answer, but some (clumsy) thoughts.

The idea is to introduce a dummy variable instead of y (=0) so that Mathematica can properly compute partial derivatives:

expr0 = Normal@
   Series[expr, {y, 0, 0}] /. {(t : (T | S))[x, 0] :> t[x, z], 
   Derivative[n_, m_][t : (T | S)][x, 0] -> Derivative[n, m][t][x, z]}

{-4*(-1 + 3*x^2)*T[x, z]^2 + 2*x*(-1 + x^2)*T[x, z]*Derivative[1, 0][T][x, z], x*(-1 + x^2)*T[x, z]*Derivative[1, 0][S][x, z] + S[x, z]*((2 - 6*x^2)*T[x, z] + x*(-1 + x^2)*Derivative[1, 0][T][x, z])}

All the next is simple enough:

tsol = DSolve[expr0[[1]] == 0, T[x, z], x]

{{T[x, z] -> 0}, {T[x, z] -> x^2 (1 - x^2)^2 C[1]}}

And for the second variable:

Block[{T}, T[x_, z_] = tsol[[2, 1, 2]]; 
 DSolve[expr0[[2]] == 0, S[x, z], x]]

{{S[x, z] -> C[2]}}

$\endgroup$
  • $\begingroup$ This works for the zeroth order term, but if I want higher order terms I don't really see how to adapt it. I really want to obtain a solution to the equations for T[x,y] and S[x,y] as power series in y $\endgroup$ – ThunderBiggi Nov 29 '19 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.