Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.5K Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Check whether a function is a solution to this differential equation?

Posted 9 years ago
POSTED BY: Brianna Cimino
4 Replies
POSTED BY: Daniel Lichtblau

This sort of thing should go to an instructor or TA rather than a forum, but I'll show one such.

First, it pays to use code that actually corresponds to the exercise. The value for right was missing a needed term. Second, these are funcions of the independent variable x, not y. I realize it's a dummy variable, but since y is used as dependent variable it makes things very confusing to have definitions using that as the dummy variable; now the sort of thing to do unless one is fairly experienced using the Wolfram Language in calculus.

left[x_] := x*y'[x]
right[x_] := 3*y[x] + x^4*Cos[x]

Third is to recognize that the assignment asks to verify a solution. Call it f[x] for now, and we'll plug it into y to see if it is valid.

f[x_] := x^3*Sin[x]
pluggedIn = left[x] - right[x] /. y -> f

(* Out[309]= -x^4 Cos[x] - 3 x^3 Sin[x] + x (x^3 Cos[x] + 3 x^2 Sin[x]) *)

Is this zero?

Simplify[pluggedIn]

(* Out[310]= 0 *)
POSTED BY: Daniel Lichtblau

You may try the following approach:

In[1]:= y[x_] := x^3 Sin[x]

In[2]:= x y'[x] == 3 y[x] + x^4 Cos[x] // Simplify
Out[2]= True
Posted 9 years ago

I appreciate your help. However, I am getting the out as left[x]-right[x] now

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