How to remove "y(x)" from this DE solution?

  • #1
Dwightun
2
0
TL;DR Summary
DE solution
Hi,
I have my solved DE, like this:
1588938108626.png

How can i get sin(pi x /2) (without "y(x)=") to put it in array?
Thank you in advance
 

Attachments

  • 1588938041446.png
    1588938041446.png
    1.3 KB · Views: 149

Answers and Replies

  • #3
S.G. Janssens
Science Advisor
Education Advisor
1,223
818
Summary:: DE solution

Hi,
I have my solved DE, like this:
View attachment 262344
How can i get sin(pi x /2) (without "y(x)=") to put it in array?
Thank you in advance
It is not correct to use the output of dsolve to define a function like you did above.
Instead, you can use the assign command, for example like this:
Maple 2018:
restart;

# Specify ODE and initial conditions.
ode := diff(y(x), x, x) = -y(x);
ics := y(0) = 1, D(y)(0) = 0;

# Solve ODE and assign the output.
sol := dsolve({ode, ics}, y(x));
assign(sol);

# Now you can evaluate the solution.
plot(y(x), x = 0..2*Pi);
 
Last edited:

Suggested for: How to remove "y(x)" from this DE solution?

Replies
10
Views
594
Replies
1
Views
217
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
6
Views
883
Replies
1
Views
486
  • Last Post
Replies
0
Views
513
Replies
1
Views
1K
Replies
4
Views
1K
Replies
2
Views
709
Replies
3
Views
383
Top