i have syntax problem solving differential equation in mathematica (10th version).
the input equation need solve follows:
solv = dsolve[{ a*u''[y] - b*u[y] == d, u'[0] == 0, u[1] == 0}, u, {y, -1, 1}] which after using exptotrig , fullsimplify answer looking for:
(d (-1 + cosh[(sqrt[b] y)/sqrt[a]] sech[sqrt[b]/sqrt[a]]))/b however, problem comes when want place more coefficients in equation. example:
solv = dsolve[{ a* u''[y] - b* c* u[y] == d, u'[0] == 0, u[1] == 0}, u, {y, -1, 1}] this time, for:
fullsimplify[exptotrig[evaluate[u[y] /. solv]]] the next answer:
(d (1 + e^((2 sqrt[b] sqrt[c])/sqrt[a]) - e^(-((sqrt[b] sqrt[c] (-1 + y))/sqrt[a])) - e^((sqrt[b] sqrt[c] (1 + y))/sqrt[a])) (-1 + tanh[(sqrt[b] sqrt[c])/sqrt[a]]))/(2 b c) instead, when merge b , c (substitute: bc=b*c):
solv = dsolve[{ a*u''[y] - bc*u[y] == d, u'[0] == 0, u[1] == 0}, u, {y, -1, 1}] i get:
(d (-1 + cosh[(sqrt[bc] y)/sqrt[a]] sech[sqrt[bc]/sqrt[a]]))/bc in case can't substitute because there many equations , of parameters (coefficients) cancel.
thanks!
your issue fullsimplify. deems exp form more "simple" trig form undoing exptotrig doing. using simplify in place maintain exptotrig conversion. quick try below shows comparison.

Comments
Post a Comment