Group Abstract Group Abstract

Message Boards Message Boards

[?] Solve a differential equation with DSolve?

Posted 8 years ago
POSTED BY: Brian Cao
2 Replies

Brian,

They are not equal.

If you substitute your expression (as fixed by Michael's suggestions above) you get:

In[8]:= yy[x] = E^-x (2 + Pi) - 2 Sin[x]

Out[8]= E^-x (2 + \[Pi]) - 2 Sin[x]

In[12]:= FullSimplify[D[yy[x], x] + yy[x] == 4 Sin[x]]

Out[12]= Cos[x] + 3 Sin[x] == 0

And you can verify this another way by directly solving the original equation:

In[3]:= ans = DSolve[y'[t] + y[t] == 4 Sin[t], y[t], t]

Out[3]= {{y[t] -> E^-t C[1] + 2 (-Cos[t] + Sin[t])}}
POSTED BY: Neil Singer

It's E for $e$, Pi for $\pi$, and generally starting-with-capitals in Mathematica, and make sure you have spaces or a * between things being multiplied.

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard